Skip to content

Commit 71ea1c0

Browse files
committed
TLS: Set SSL_MODE_AUTO_RETRY to SSL
1 parent 721835b commit 71ea1c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/netlog/netlog-tls.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ int tls_connect(TLSManager *m, SocketAddress *address) {
221221
return log_error_errno(SYNTHETIC_ERRNO(EIO),
222222
"Failed to SSL_set_fd: %s",
223223
ERR_error_string(ERR_get_error(), NULL));
224-
225224
/* Cerification verification */
226225
if (m->auth_mode != OPEN_SSL_CERTIFICATE_AUTH_MODE_NONE && m->auth_mode != OPEN_SSL_CERTIFICATE_AUTH_MODE_INVALID) {
227226
log_debug("TLS: enable certificate verification");
@@ -234,7 +233,9 @@ int tls_connect(TLSManager *m, SocketAddress *address) {
234233
log_debug("TLS: disable certificate verification");
235234
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
236235
}
236+
237237
SSL_CTX_set_default_verify_paths(ctx);
238+
SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
238239

239240
r = SSL_connect(ssl);
240241
if (r <= 0)

0 commit comments

Comments
 (0)