openssl: SSL_SESSION->ssl_version no longer exist
The struct went private in 1.0.2 so we cannot read the version number from there anymore. Use SSL_version() instead! Reported-by: Gisle Vanem Bug: http://curl.haxx.se/mail/lib-2015-02/0034.html
This commit is contained in:
@@ -1660,12 +1660,12 @@ select_next_proto_cb(SSL *ssl,
|
|||||||
#endif /* USE_NGHTTP2 */
|
#endif /* USE_NGHTTP2 */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
get_ssl_version_txt(SSL_SESSION *session)
|
get_ssl_version_txt(SSL *ssl)
|
||||||
{
|
{
|
||||||
if(!session)
|
if(!ssl)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
switch(session->ssl_version) {
|
switch(SSL_version(ssl)) {
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
|
#if OPENSSL_VERSION_NUMBER >= 0x1000100FL
|
||||||
case TLS1_2_VERSION:
|
case TLS1_2_VERSION:
|
||||||
return "TLSv1.2";
|
return "TLSv1.2";
|
||||||
@@ -2203,7 +2203,7 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
|
|||||||
|
|
||||||
/* Informational message */
|
/* Informational message */
|
||||||
infof(data, "SSL connection using %s / %s\n",
|
infof(data, "SSL connection using %s / %s\n",
|
||||||
get_ssl_version_txt(SSL_get_session(connssl->handle)),
|
get_ssl_version_txt(connssl->handle),
|
||||||
SSL_get_cipher(connssl->handle));
|
SSL_get_cipher(connssl->handle));
|
||||||
|
|
||||||
#ifdef HAS_ALPN
|
#ifdef HAS_ALPN
|
||||||
|
|||||||
Reference in New Issue
Block a user