未验证 提交 7c093460 编写于 作者: M Me No Dev 提交者: GitHub

Fix conflict with ESP-IDF's esp_crt_bundle (#7560)

上级 deca1507
......@@ -264,10 +264,10 @@ void WiFiClientSecure::setCACert (const char *rootCA)
{
if (bundle != NULL)
{
esp_crt_bundle_set(bundle);
arduino_esp_crt_bundle_set(bundle);
_use_ca_bundle = true;
} else {
esp_crt_bundle_detach(NULL);
arduino_esp_crt_bundle_detach(NULL);
_use_ca_bundle = false;
}
}
......
......@@ -176,7 +176,7 @@ static esp_err_t esp_crt_bundle_init(const uint8_t *x509_bundle)
return ESP_OK;
}
esp_err_t esp_crt_bundle_attach(void *conf)
esp_err_t arduino_esp_crt_bundle_attach(void *conf)
{
esp_err_t ret = ESP_OK;
// If no bundle has been set by the user then use the bundle embedded in the binary
......@@ -199,7 +199,7 @@ esp_err_t esp_crt_bundle_attach(void *conf)
return ret;
}
void esp_crt_bundle_detach(mbedtls_ssl_config *conf)
void arduino_esp_crt_bundle_detach(mbedtls_ssl_config *conf)
{
free(s_crt_bundle.crts);
s_crt_bundle.crts = NULL;
......@@ -208,7 +208,7 @@ void esp_crt_bundle_detach(mbedtls_ssl_config *conf)
}
}
void esp_crt_bundle_set(const uint8_t *x509_bundle)
void arduino_esp_crt_bundle_set(const uint8_t *x509_bundle)
{
// Free any previously used bundle
free(s_crt_bundle.crts);
......
......@@ -36,7 +36,7 @@ extern "C" {
* - ESP_OK if adding certificates was successful.
* - Other if an error occured or an action must be taken by the calling process.
*/
esp_err_t esp_crt_bundle_attach(void *conf);
esp_err_t arduino_esp_crt_bundle_attach(void *conf);
/**
......@@ -46,7 +46,7 @@ esp_err_t esp_crt_bundle_attach(void *conf);
*
* @param[in] conf The config struct for the SSL connection.
*/
void esp_crt_bundle_detach(mbedtls_ssl_config *conf);
void arduino_esp_crt_bundle_detach(mbedtls_ssl_config *conf);
/**
......@@ -58,7 +58,7 @@ void esp_crt_bundle_detach(mbedtls_ssl_config *conf);
*
* @param[in] x509_bundle A pointer to the certificate bundle.
*/
void esp_crt_bundle_set(const uint8_t *x509_bundle);
void arduino_esp_crt_bundle_set(const uint8_t *x509_bundle);
#ifdef __cplusplus
......
......@@ -193,7 +193,7 @@ int start_ssl_client(sslclient_context *ssl_client, const char *host, uint32_t p
}
} else if (useRootCABundle) {
log_v("Attaching root CA cert bundle");
ret = esp_crt_bundle_attach(&ssl_client->ssl_conf);
ret = arduino_esp_crt_bundle_attach(&ssl_client->ssl_conf);
if (ret < 0) {
return handle_error(ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册