mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
esp_tls_wolfssl: Move order of crt_bundle check to match that in
esp_tls_mbedtls
This commit is contained in:
@@ -157,6 +157,11 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
|
|||||||
return ESP_ERR_WOLFSSL_CTX_SETUP_FAILED;
|
return ESP_ERR_WOLFSSL_CTX_SETUP_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cfg->crt_bundle_attach != NULL) {
|
||||||
|
ESP_LOGE(TAG,"use_crt_bundle not supported in wolfssl");
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
if (cfg->use_global_ca_store == true) {
|
if (cfg->use_global_ca_store == true) {
|
||||||
if ((esp_load_wolfssl_verify_buffer(tls, global_cacert, global_cacert_pem_bytes, FILE_TYPE_CA_CERT, &ret)) != ESP_OK) {
|
if ((esp_load_wolfssl_verify_buffer(tls, global_cacert, global_cacert_pem_bytes, FILE_TYPE_CA_CERT, &ret)) != ESP_OK) {
|
||||||
ESP_LOGE(TAG, "Error in loading certificate verify buffer, returned %d", ret);
|
ESP_LOGE(TAG, "Error in loading certificate verify buffer, returned %d", ret);
|
||||||
@@ -223,11 +228,6 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg->crt_bundle_attach != NULL) {
|
|
||||||
ESP_LOGE(TAG,"use_crt_bundle not supported in wolfssl");
|
|
||||||
return ESP_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
tls->priv_ssl =(void *)wolfSSL_new( (WOLFSSL_CTX *)tls->priv_ctx);
|
tls->priv_ssl =(void *)wolfSSL_new( (WOLFSSL_CTX *)tls->priv_ctx);
|
||||||
if (!tls->priv_ssl) {
|
if (!tls->priv_ssl) {
|
||||||
ESP_LOGE(TAG, "Create wolfSSL failed");
|
ESP_LOGE(TAG, "Create wolfSSL failed");
|
||||||
|
Reference in New Issue
Block a user