Merge pull request #6435 from vifino/patch-1

Fixed missing SSL_get_client_ciphers with LibreSSL
This commit is contained in:
Jnewbon
2020-01-21 16:19:40 +00:00
committed by GitHub

View File

@ -814,12 +814,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) {