diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2023-01-17 14:27:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 14:27:27 +0200 |
commit | 4929d552b22b93c5270ff0480d1fb233d7fbea32 (patch) | |
tree | 67d11ad623afe70dfa5703e402b5d1319a9d1494 /web/server | |
parent | 795e62ea86304ad9fef8756aab0a3d8f60162c09 (diff) |
Check session variable before resuming it (#14279)
check session variable before resuming it
Diffstat (limited to 'web/server')
-rw-r--r-- | web/server/web_client_cache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/server/web_client_cache.c b/web/server/web_client_cache.c index 51271a6006..17d411157c 100644 --- a/web/server/web_client_cache.c +++ b/web/server/web_client_cache.c @@ -14,10 +14,12 @@ static void web_client_reuse_ssl(struct web_client *w) { SSL_SESSION *session = SSL_get_session(w->ssl.conn); SSL *old = w->ssl.conn; w->ssl.conn = SSL_new(netdata_ssl_srv_ctx); + if (session) { #if OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_111 - if (SSL_SESSION_is_resumable(session)) + if (SSL_SESSION_is_resumable(session)) #endif - SSL_set_session(w->ssl.conn, session); + SSL_set_session(w->ssl.conn, session); + } SSL_free(old); } } |