From a3c8760d4118f51fb38808e6c2b18a6161eaac0a Mon Sep 17 00:00:00 2001 From: Tim Hawes Date: Sat, 27 Nov 2021 12:40:55 +0000 Subject: [PATCH] Fix to error checking in espressif SSLSocket --- ports/espressif/common-hal/ssl/SSLSocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index f9e13029cc..b1d0720be1 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -66,7 +66,7 @@ void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); - } else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { + } else if (err == ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { mp_raise_OSError_msg_varg(translate("Failed SSL handshake")); } else { mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result);