You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/WiFiClientSecure/src/ssl_client.cpp
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@
15
15
#include<lwip/netdb.h>
16
16
#include"ssl_client.h"
17
17
18
+
18
19
constchar *pers = "esp32-tls";
19
20
20
21
staticinthandle_error(int err)
@@ -153,11 +154,9 @@ int start_ssl_client(sslclient_context *ssl_client, uint32_t ipAddress, uint32_t
153
154
log_i("Performing the SSL/TLS handshake...");
154
155
155
156
while ((ret = mbedtls_ssl_handshake(&ssl_client->ssl_ctx)) != 0) {
156
-
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret != -76) {//workaround for bug: https://github.com/espressif/esp-idf/issues/434
157
+
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
157
158
returnhandle_error(ret);
158
159
}
159
-
delay(10);
160
-
vPortYield();
161
160
}
162
161
163
162
@@ -224,7 +223,7 @@ int data_to_read(sslclient_context *ssl_client)
224
223
//log_e("RET: %i",ret); //for low level debug
225
224
res = mbedtls_ssl_get_bytes_avail(&ssl_client->ssl_ctx);
226
225
//log_e("RES: %i",res);
227
-
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret < 0 && ret != -76) {
226
+
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret < 0) {
228
227
returnhandle_error(ret);
229
228
}
230
229
@@ -238,7 +237,7 @@ int send_ssl_data(sslclient_context *ssl_client, const uint8_t *data, uint16_t l
238
237
int ret = -1;
239
238
240
239
while ((ret = mbedtls_ssl_write(&ssl_client->ssl_ctx, data, len)) <= 0) {
241
-
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE && ret != -76) {
240
+
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
0 commit comments