Commit 248a64f0 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Compile with OpenSSL 1.1.0-pre1

parent 68c5deea
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <deque> #include <deque>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/dh.h>
#include <zlib.h> #include <zlib.h>
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <openssl/x509.h> #include <openssl/x509.h>
#include <openssl/x509v3.h> #include <openssl/x509v3.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/dh.h>
#include <nghttp2/nghttp2.h> #include <nghttp2/nghttp2.h>
......
...@@ -80,12 +80,7 @@ LibsslGlobalLock::LibsslGlobalLock() { ...@@ -80,12 +80,7 @@ LibsslGlobalLock::LibsslGlobalLock() {
LibsslGlobalLock::~LibsslGlobalLock() { ssl_global_locks.clear(); } LibsslGlobalLock::~LibsslGlobalLock() { ssl_global_locks.clear(); }
const char *get_tls_protocol(SSL *ssl) { const char *get_tls_protocol(SSL *ssl) {
auto session = SSL_get_session(ssl); switch (SSL_version(ssl)) {
if (!session) {
return "unknown";
}
switch (session->ssl_version) {
case SSL2_VERSION: case SSL2_VERSION:
return "SSLv2"; return "SSLv2";
case SSL3_VERSION: case SSL3_VERSION:
...@@ -113,10 +108,12 @@ TLSSessionInfo *get_tls_session_info(TLSSessionInfo *tls_info, SSL *ssl) { ...@@ -113,10 +108,12 @@ TLSSessionInfo *get_tls_session_info(TLSSessionInfo *tls_info, SSL *ssl) {
tls_info->cipher = SSL_get_cipher_name(ssl); tls_info->cipher = SSL_get_cipher_name(ssl);
tls_info->protocol = get_tls_protocol(ssl); tls_info->protocol = get_tls_protocol(ssl);
tls_info->session_id = session->session_id;
tls_info->session_id_length = session->session_id_length;
tls_info->session_reused = SSL_session_reused(ssl); tls_info->session_reused = SSL_session_reused(ssl);
unsigned int session_id_length;
tls_info->session_id = SSL_SESSION_get_id(session, &session_id_length);
tls_info->session_id_length = session_id_length;
return tls_info; return tls_info;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment