Skip to content

Commit

Permalink
Curl_ssl_getsessionid: fail if no session cache exists
Browse files Browse the repository at this point in the history
This function might get called for an easy handle for which the session
cache hasn't been setup. It now just returns a "miss" in that case.

Fixes #7148
  • Loading branch information
bagder committed May 31, 2021
1 parent 1c1d9f1 commit 0daeb68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vtls/vtls.c
Expand Up @@ -407,8 +407,9 @@ bool Curl_ssl_getsessionid(struct Curl_easy *data,

DEBUGASSERT(SSL_SET_OPTION(primary.sessionid));

if(!SSL_SET_OPTION(primary.sessionid))
/* session ID re-use is disabled */
if(!SSL_SET_OPTION(primary.sessionid) || !data->state.session)
/* session ID re-use is disabled or the session cache has not been
setup */
return TRUE;

/* Lock if shared */
Expand Down

0 comments on commit 0daeb68

Please sign in to comment.