Skip to content

Commit 601ebd5

Browse files
committed
ssl: output error message when handshake failed.
1 parent b133ce4 commit 601ebd5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/dns_client.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2969,9 +2969,7 @@ static int _dns_client_process_tls(struct dns_server_info *server_info, struct e
29692969
if (server_info->status == DNS_SERVER_STATUS_CONNECTING) {
29702970
/* do SSL hand shake */
29712971
ret = _ssl_do_handshake(server_info);
2972-
if (ret == 0) {
2973-
goto errout;
2974-
} else if (ret < 0) {
2972+
if (ret <= 0) {
29752973
memset(&fd_event, 0, sizeof(fd_event));
29762974
ssl_ret = _ssl_get_error(server_info, ret);
29772975
if (ssl_ret == SSL_ERROR_WANT_READ) {

src/dns_server.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6174,9 +6174,7 @@ static int _dns_server_process_tls(struct dns_server_conn_tls_client *tls_client
61746174
if (tls_client->status == DNS_SERVER_CLIENT_STATUS_CONNECTING) {
61756175
/* do SSL hand shake */
61766176
ret = _ssl_do_accept(tls_client);
6177-
if (ret == 0) {
6178-
goto errout;
6179-
} else if (ret < 0) {
6177+
if (ret <= 0) {
61806178
memset(&fd_event, 0, sizeof(fd_event));
61816179
ssl_ret = _ssl_get_error(tls_client, ret);
61826180
if (ssl_ret == SSL_ERROR_WANT_READ) {

0 commit comments

Comments
 (0)