Skip to content

Commit ea635c2

Browse files
esp_tls_wolfssl: fix incorrect error message after handshake fails
1 parent eeeaba4 commit ea635c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp-tls/esp_tls_wolfssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ ssize_t esp_wolfssl_write(esp_tls_t *tls, const char *data, size_t datalen)
380380
void esp_wolfssl_verify_certificate(esp_tls_t *tls)
381381
{
382382
int flags;
383-
if ((flags = wolfSSL_get_verify_result( (WOLFSSL *)tls->priv_ssl)) != WOLFSSL_SUCCESS) {
383+
if ((flags = wolfSSL_get_verify_result( (WOLFSSL *)tls->priv_ssl)) != X509_V_OK) {
384384
ESP_LOGE(TAG, "Failed to verify peer certificate , returned %d!", flags);
385385
ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ERR_TYPE_WOLFSSL_CERT_FLAGS, flags);
386386
} else {

0 commit comments

Comments
 (0)