Skip to content

Commit

Permalink
Fix compile error on OpenBSD which has no SSL_OP_NO_RENEGOTIATION
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Jan 3, 2024
1 parent 7ce9457 commit 1b3be52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/base/tlsutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ static void InitSslContext(const Shared<boost::asio::ssl::context>::Ptr& context

flags |= SSL_OP_CIPHER_SERVER_PREFERENCE;

#if OPENSSL_VERSION_NUMBER < 0x10100000L
#ifdef LIBRESSL_VERSION_NUMBER
flags |= SSL_OP_NO_CLIENT_RENEGOTIATION;
#elif OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_CTX_set_info_callback(sslContext, [](const SSL* ssl, int where, int) {
if (where & SSL_CB_HANDSHAKE_DONE) {
ssl->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS;
Expand Down

0 comments on commit 1b3be52

Please sign in to comment.