Fix showSecureCipherInfo() to build with OpenSSL 1.1.0

This commit is contained in:
Andrew Nelless 2017-05-05 01:27:25 +01:00
parent 0888b1228c
commit a73b65431b
1 changed files with 8 additions and 3 deletions

View File

@ -805,9 +805,14 @@ SecureSocket::showSecureCipherInfo()
showCipherStackDesc(sStack);
}
// m_ssl->m_ssl->session->ciphers is not forward compatable, In future release
// of OpenSSL, it's not visible, need to use SSL_get_client_ciphers() instead
#if OPENSSL_VERSION_NUMBER < 0x10100000L
// m_ssl->m_ssl->session->ciphers is not forward compatable,
// In future release of OpenSSL, it's not visible,
STACK_OF(SSL_CIPHER) * cStack = m_ssl->m_ssl->session->ciphers;
#else
// Use SSL_get_client_ciphers() for newer versions
STACK_OF(SSL_CIPHER) * cStack = SSL_get_client_ciphers(m_ssl->m_ssl);
#endif
if (cStack == NULL) {
LOG((CLOG_DEBUG1 "remote cipher list not available"));
}