Compile with OpenSSL 1.1.0-pre1
This commit is contained in:
parent
68c5deea5a
commit
248a64f0b2
|
@ -53,6 +53,7 @@
|
|||
#include <deque>
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/dh.h>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/dh.h>
|
||||
|
||||
#include <nghttp2/nghttp2.h>
|
||||
|
||||
|
|
13
src/ssl.cc
13
src/ssl.cc
|
@ -80,12 +80,7 @@ LibsslGlobalLock::LibsslGlobalLock() {
|
|||
LibsslGlobalLock::~LibsslGlobalLock() { ssl_global_locks.clear(); }
|
||||
|
||||
const char *get_tls_protocol(SSL *ssl) {
|
||||
auto session = SSL_get_session(ssl);
|
||||
if (!session) {
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
switch (session->ssl_version) {
|
||||
switch (SSL_version(ssl)) {
|
||||
case SSL2_VERSION:
|
||||
return "SSLv2";
|
||||
case SSL3_VERSION:
|
||||
|
@ -113,10 +108,12 @@ TLSSessionInfo *get_tls_session_info(TLSSessionInfo *tls_info, SSL *ssl) {
|
|||
|
||||
tls_info->cipher = SSL_get_cipher_name(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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue