Skip to content
Commit 4842a27b authored by Todd Short's avatar Todd Short Committed by Tomas Mraz
Browse files

Free up space in the session cache before adding.



Fixes #18690

In some circumstances, it's possible that when using an external
database for the session cache, that pulling in an entry from that
cache to the internal cache will cause the newly added entry to
be deleted from the internal cache. This is likely to happen when
the internal cache is set to have a small size, and the newly added
entry's timeout places it at the end of the cache list.

This could be fixed by updating the timestamp of the session (via
`SSL_SESSION_set_time()` or `SSL_SESSION_set_timeout()`) before
adding to the cache. But that may not be desireable.

Reviewed-by: default avatarViktor Dukhovni <viktor@openssl.org>
Reviewed-by: default avatarPaul Dale <pauli@openssl.org>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18905)
parent 72a85c17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment