Merge branch 'bugfix/change_function_pointer_esp_crt_bundle_attach' into 'master'
esp_tls: change argument pointer type to (void *) for esp_crt_bundle_attach See merge request espressif/esp-idf!7947
This commit is contained in:
commit
1cde594460
|
@ -197,7 +197,7 @@ typedef struct esp_tls_cfg {
|
||||||
then PSK authentication is enabled with configured setup.
|
then PSK authentication is enabled with configured setup.
|
||||||
Important note: the pointer must be valid for connection */
|
Important note: the pointer must be valid for connection */
|
||||||
|
|
||||||
esp_err_t (*crt_bundle_attach)(mbedtls_ssl_config *conf);
|
esp_err_t (*crt_bundle_attach)(void *conf);
|
||||||
/*!< Function pointer to esp_crt_bundle_attach. Enables the use of certification
|
/*!< Function pointer to esp_crt_bundle_attach. Enables the use of certification
|
||||||
bundle for server verification, must be enabled in menuconfig */
|
bundle for server verification, must be enabled in menuconfig */
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ static esp_err_t esp_crt_bundle_init(const uint8_t *x509_bundle)
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_crt_bundle_attach(mbedtls_ssl_config *conf)
|
esp_err_t esp_crt_bundle_attach(void *conf)
|
||||||
{
|
{
|
||||||
esp_err_t ret = ESP_OK;
|
esp_err_t ret = ESP_OK;
|
||||||
// If no bundle has been set by the user then use the bundle embedded in the binary
|
// If no bundle has been set by the user then use the bundle embedded in the binary
|
||||||
|
@ -195,8 +195,8 @@ esp_err_t esp_crt_bundle_attach(mbedtls_ssl_config *conf)
|
||||||
* cacert_ptr passes non-NULL check during handshake
|
* cacert_ptr passes non-NULL check during handshake
|
||||||
*/
|
*/
|
||||||
mbedtls_x509_crt_init(&s_dummy_crt);
|
mbedtls_x509_crt_init(&s_dummy_crt);
|
||||||
conf->ca_chain = &s_dummy_crt;
|
((mbedtls_ssl_config *)conf)->ca_chain = &s_dummy_crt;
|
||||||
mbedtls_ssl_conf_verify(conf, esp_crt_verify_callback, NULL);
|
mbedtls_ssl_conf_verify((mbedtls_ssl_config *)conf, esp_crt_verify_callback, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -36,7 +36,7 @@ extern "C" {
|
||||||
* - ESP_OK if adding certificates was successful.
|
* - ESP_OK if adding certificates was successful.
|
||||||
* - Other if an error occured or an action must be taken by the calling process.
|
* - Other if an error occured or an action must be taken by the calling process.
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_crt_bundle_attach(mbedtls_ssl_config *conf);
|
esp_err_t esp_crt_bundle_attach(void *conf);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue