SecureSocket: Fix LibreSSL support.

Weirdly enough, LibreSSL has a high enough version, yet does not feature SSL_get_client_ciphers.
This commit is contained in:
Adrian Pistol
2018-10-24 21:54:12 +02:00
committed by GitHub
parent 0e7fef7ceb
commit 17d27a67d9

View File

@ -808,12 +808,13 @@ SecureSocket::showSecureCipherInfo()
showCipherStackDesc(sStack);
}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
// m_ssl->m_ssl->session->ciphers is not forward compatable,
// In future release of OpenSSL, it's not visible,
// however, LibreSSL still uses this.
STACK_OF(SSL_CIPHER) * cStack = m_ssl->m_ssl->session->ciphers;
#else
// Use SSL_get_client_ciphers() for newer versions
// Use SSL_get_client_ciphers() for newer versions of OpenSSL.
STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
#endif
if (cStack == NULL) {