Skip to content

Commit

Permalink
Check for both SSL_set0_rbio and SSL_set0_wbio
Browse files Browse the repository at this point in the history
This updates commit bbec15d - "fix build with libressl"

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
  • Loading branch information
pqarmitage committed Apr 18, 2022
1 parent cbc4d98 commit 5cb4030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
AC_CHECK_FUNCS([SSL_CTX_set_verify_depth])
# SSL_set0_rbio(), SSL_set0_wbio() OPENSSL_init_crypto() and TLS_method() introduced OpenSSL v1.1.0
AC_CHECK_FUNCS([SSL_set0_wbio OPENSSL_init_crypto TLS_method])
AC_CHECK_FUNCS([SSL_set0_rbio SSL_set0_wbio OPENSSL_init_crypto TLS_method])
# In OpenSSL v1.1.1 the call to SSL_CTX_new() fails if OPENSSL_init_crypto() has been called with
# OPENSSL_INIT_NO_LOAD_CONFIG. It does not fail in v1.1.0h and v1.1.1b.
Expand Down
2 changes: 1 addition & 1 deletion keepalived/check/check_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ ssl_connect(thread_ref_t thread, int new_req)
BIO_get_fd(req->bio, &bio_fd);
if (fcntl(bio_fd, F_SETFD, fcntl(bio_fd, F_GETFD) | FD_CLOEXEC) == -1)
log_message(LOG_INFO, "Setting CLOEXEC failed on ssl socket - errno %d", errno);
#ifdef HAVE_SSL_SET0_WBIO
#if defined HAVE_SSL_SET0_RBIO && defined HAVE_SSL_SET0_WBIO
BIO_up_ref(req->bio);
SSL_set0_rbio(req->ssl, req->bio);
SSL_set0_wbio(req->ssl, req->bio);
Expand Down

0 comments on commit 5cb4030

Please sign in to comment.