From f6b0307e1acdb97c9a791ee4635ea7becb591017 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 17 Jun 2020 15:52:30 +0530 Subject: [PATCH] esp_tls_wolfssl: fix incorrect error message after handshake fails --- components/esp-tls/esp_tls_wolfssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp-tls/esp_tls_wolfssl.c b/components/esp-tls/esp_tls_wolfssl.c index 7c99830c4..d929ad04b 100644 --- a/components/esp-tls/esp_tls_wolfssl.c +++ b/components/esp-tls/esp_tls_wolfssl.c @@ -380,7 +380,7 @@ ssize_t esp_wolfssl_write(esp_tls_t *tls, const char *data, size_t datalen) void esp_wolfssl_verify_certificate(esp_tls_t *tls) { int flags; - if ((flags = wolfSSL_get_verify_result( (WOLFSSL *)tls->priv_ssl)) != WOLFSSL_SUCCESS) { + if ((flags = wolfSSL_get_verify_result( (WOLFSSL *)tls->priv_ssl)) != X509_V_OK) { ESP_LOGE(TAG, "Failed to verify peer certificate , returned %d!", flags); ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ERR_TYPE_WOLFSSL_CERT_FLAGS, flags); } else {