Skip to content

Commit

Permalink
tls: add tls_connect debug (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored Oct 14, 2022
1 parent 35b94f2 commit 51860ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tls/openssl/tls_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ static int tls_connect(struct tls_conn *tc)
if (r <= 0) {
const int ssl_err = SSL_get_error(tc->ssl, r);

ERR_clear_error();

switch (ssl_err) {

case SSL_ERROR_WANT_READ:
Expand All @@ -157,9 +155,12 @@ static int tls_connect(struct tls_conn *tc)
default:
DEBUG_WARNING("connect: error (r=%d, ssl_err=%d)\n",
r, ssl_err);
tls_flush_error();
err = EPROTO;
break;
}

ERR_clear_error();
}

return err;
Expand Down

0 comments on commit 51860ae

Please sign in to comment.