diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-03-28 15:35:29 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-04-03 19:25:24 +0200 |
commit | 13185681ff08d13bd2541ab0013b4501d73cfd00 (patch) | |
tree | 1f790757abe866dd4e6a09b6eb120a1badc51a81 /thirdparty/lws/client | |
parent | dbf7898ceab7e6b9e3ca975301b91dd290c23ffb (diff) |
mbedtls: client: stop spinning on handshake fail
Backport cf3a4ee49357f4e6f3aaeb98137d85c307b17008 from 2.4-stable to
2.4.2
Diffstat (limited to 'thirdparty/lws/client')
-rw-r--r-- | thirdparty/lws/client/ssl-client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/thirdparty/lws/client/ssl-client.c b/thirdparty/lws/client/ssl-client.c index b69fd2da30..6626e08448 100644 --- a/thirdparty/lws/client/ssl-client.c +++ b/thirdparty/lws/client/ssl-client.c @@ -284,9 +284,13 @@ some_wait: char *p = (char *)&pt->serv_buf[0]; char *sb = p; - lwsl_err("ssl hs1 error, X509_V_ERR = %d: %s\n", - n, ERR_error_string(n, sb)); + lwsl_err("ssl hs1 error, X509_V_ERR = %d: errno %d: %s\n", + n, errno, ERR_error_string(n, sb)); lws_ssl_elaborate_error(); +#if defined(LWS_WITH_MBEDTLS) + if (n == SSL_ERROR_SYSCALL) + return -1; +#endif } n = -1; |