mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_tls: change argument pointer type to (void *) for esp_crt_bundle_attach
This commit is contained in:
parent
59381b60c0
commit
874e987a3b
@ -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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,4 +64,4 @@ void esp_crt_bundle_set(const uint8_t *x509_bundle);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //_ESP_CRT_BUNDLE_H_
|
#endif //_ESP_CRT_BUNDLE_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user