Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 89623002: net: Implement new SSL session cache for OpenSSL sockets. (Closed)

Created:
7 years ago by digit1
Modified:
7 years ago
Reviewers:
agl, wtc, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

net: Implement new SSL session cache for OpenSSL sockets. This patch reworks the SSL session caching scheme for OpenSSL client sockets, as an attempt to get rid of the mysterious crashes described at http://crbug.com/298606 - Move the internal SSLSessionCache class to its own source file, while renaming it as SSLSessionCacheOpenSSL. - Change the session caching logic to: - Completely disable OpenSSL's builtin cache. - Implement Session ID generation (and uniqueness check). - Implement eviction and expiration detection. - Add a unit test for SSLSessionCacheOpenSSL. - Modify SSLClientSocketOpenSSL implementation to use the new cache. BUG=298606 R=rsleevi@chromium.org,agl@chromium.org,wtc@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238398

Patch Set 1 #

Patch Set 2 : Fix linux_redux build #

Patch Set 3 : Fix component build. #

Patch Set 4 : Fix component build #

Patch Set 5 : Remove un-needed includes #

Total comments: 26

Patch Set 6 : nits #

Patch Set 7 : Optimize insertion into KeyIndex for new sessions. #

Total comments: 9

Patch Set 8 : Update comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+995 lines, -147 lines) Patch
M net/net.gyp View 1 2 5 chunks +24 lines, -10 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 8 chunks +31 lines, -137 lines 0 comments Download
A net/socket/ssl_session_cache_openssl.h View 1 2 3 4 1 chunk +133 lines, -0 lines 2 comments Download
A net/socket/ssl_session_cache_openssl.cc View 1 2 3 4 5 6 7 1 chunk +479 lines, -0 lines 0 comments Download
A net/socket/ssl_session_cache_openssl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +328 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
digit1
7 years ago (2013-11-27 16:39:51 UTC) #1
agl
https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc File net/socket/ssl_session_cache_openssl.cc (right): https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc#newcode33 net/socket/ssl_session_cache_openssl.cc:33: static base::LazyInstance<SSLContextExIndex>::Leaky s_instance = Other instances of LazyInstance in ...
7 years ago (2013-11-27 17:29:47 UTC) #2
digit1
https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc File net/socket/ssl_session_cache_openssl.cc (right): https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc#newcode33 net/socket/ssl_session_cache_openssl.cc:33: static base::LazyInstance<SSLContextExIndex>::Leaky s_instance = On 2013/11/27 17:29:47, agl wrote: ...
7 years ago (2013-11-27 18:12:45 UTC) #3
digit1
https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc File net/socket/ssl_session_cache_openssl.cc (right): https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc#newcode361 net/socket/ssl_session_cache_openssl.cc:361: it = key_index_.find(cache_key); Actually, I've checked that using the ...
7 years ago (2013-11-27 18:26:29 UTC) #4
agl
LGTM https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc File net/socket/ssl_session_cache_openssl.cc (right): https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc#newcode70 net/socket/ssl_session_cache_openssl.cc:70: // base/containers/hash_tables.h. On 2013/11/27 18:12:45, digit1 wrote: > ...
7 years ago (2013-11-27 21:58:33 UTC) #5
digit1
https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc File net/socket/ssl_session_cache_openssl.cc (right): https://codereview.chromium.org/89623002/diff/80001/net/socket/ssl_session_cache_openssl.cc#newcode70 net/socket/ssl_session_cache_openssl.cc:70: // base/containers/hash_tables.h. I've done that, and added a blurb ...
7 years ago (2013-11-28 10:37:19 UTC) #6
digit1
Ryan and Wan-Teh, any opinion on this CL? Thanks.
7 years ago (2013-12-02 14:00:53 UTC) #7
digit1
It's been 5 days, so I'm submitting this now. If you have a reason against ...
7 years ago (2013-12-03 11:02:07 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/89623002/130001
7 years ago (2013-12-03 11:21:29 UTC) #9
commit-bot: I haz the power
Change committed as 238398
7 years ago (2013-12-03 15:13:34 UTC) #10
Ryan Sleevi
7 years ago (2013-12-03 21:20:12 UTC) #11
Message was sent while issue was closed.
Delayed LGTM, but two (minor) nits below.

https://codereview.chromium.org/89623002/diff/130001/net/socket/ssl_session_c...
File net/socket/ssl_session_cache_openssl.h (right):

https://codereview.chromium.org/89623002/diff/130001/net/socket/ssl_session_c...
net/socket/ssl_session_cache_openssl.h:48: // SSL connections being performed in
parallel in multiple threads.
I'm a little concerned that this comment is needed. If there is this happening,
it's a bug. SSL should only ever happen on the IO thread.

https://codereview.chromium.org/89623002/diff/130001/net/socket/ssl_session_c...
net/socket/ssl_session_cache_openssl.h:123: static const size_t
kMaxExpirationChecks = 256;
This is not valid syntax; it's a GCC extension that allows this.

You should be declaring the defaults in the .cc.

Powered by Google App Engine
This is Rietveld 408576698