mirror of
https://github.com/curl/curl.git
synced 2026-07-25 10:38:04 +03:00
lib: TLS session ticket caching reworked
Described in detail in internal doc TLS-SESSIONS.md Main points: - use a new `ssl_peer_key` for cache lookups by connection filters - recognize differences between TLSv1.3 and other tickets * TLSv1.3 tickets are single-use, cache can hold several of them for a peer * TLSv1.2 are reused, keep only a single one per peer - differentiate between ticket BLOB to store (that could be persisted) and object instances - use put/take/return pattern for cache access - remember TLS version, ALPN protocol, time received and lifetime of ticket - auto-expire tickets after their lifetime Closes #15774
This commit is contained in:
parent
e5e2e09a75
commit
fa0ccd9f1f
36 changed files with 1784 additions and 780 deletions
10
lib/setopt.c
10
lib/setopt.c
|
|
@ -1588,8 +1588,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
|
|||
data->hsts = NULL;
|
||||
#endif
|
||||
#ifdef USE_SSL
|
||||
if(data->share->sslsession == data->state.session)
|
||||
data->state.session = NULL;
|
||||
if(data->share->ssl_scache == data->state.ssl_scache)
|
||||
data->state.ssl_scache = NULL;
|
||||
#endif
|
||||
#ifdef USE_LIBPSL
|
||||
if(data->psl == &data->share->psl)
|
||||
|
|
@ -1632,10 +1632,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
|
|||
}
|
||||
#endif
|
||||
#ifdef USE_SSL
|
||||
if(data->share->sslsession) {
|
||||
data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions;
|
||||
data->state.session = data->share->sslsession;
|
||||
}
|
||||
if(data->share->ssl_scache)
|
||||
data->state.ssl_scache = data->share->ssl_scache;
|
||||
#endif
|
||||
#ifdef USE_LIBPSL
|
||||
if(data->share->specifier & (1 << CURL_LOCK_DATA_PSL))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue