DescriptionRewrite session cache in OpenSSL ports.
The old session cache assumed session IDs were unique and called into BoringSSL
internals in the tests. Instead separate it into:
- The session cache proper which just implements the keyed map of SSL_SESSIONs
with expiration checks and size limits. This can be unit tested without
using OpenSSL internals.
- SSLClientSocketOpenSSL which hooks into SSL_CTX and SSL as appropriate and
looks up or caches sessions.
Add additional tests in SSLClientSocket tests to ensure test coverage for the
latter.
Note: this removes the session removal logic via SSL_CTX_set_sess_remove_cb.
It was never called anyway (see https://crbug.com/466352). With that removed,
the SSL_SESSION* pointer-keyed map is unnecessary and the cache can just be
a base::MRUCache (which is what the original was based on anyway).
BUG=454044
Committed: https://crrev.com/dafe4e53058ed802fabc151e67e75ffded76fd18
Cr-Commit-Position: refs/heads/master@{#324292}
Patch Set 1 #Patch Set 2 : comment and todo #Patch Set 3 : shutdown thread nuisance #Patch Set 4 : No more remove_cb #Patch Set 5 : rebase #Patch Set 6 : use base::MRUCache (hah, that would have saved me some time...) #
Total comments: 24
Patch Set 7 : sleevi comments #
Total comments: 20
Patch Set 8 : rsleevi comments (buh, also a rebase, sorry) #
Total comments: 13
Patch Set 9 : rebase #Patch Set 10 : sleevi comments #
Total comments: 10
Patch Set 11 : #Patch Set 12 : rebase #Patch Set 13 : reebase #
Messages
Total messages: 29 (9 generated)
|