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

Issue 2604513002: Optimize CT & OCSP handling code (Closed)

Created:
3 years, 12 months ago by Ryan Sleevi
Modified:
3 years, 11 months ago
CC:
chromium-reviews, rsleevi+watch_chromium.org, certificate-transparency-chrome_googlegroups.com, cbentzel+watch_chromium.org, Eran Messeri, chromoting-reviews_chromium.org, martijn+crwatch_martijnc.be, davidben
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimize CT & OCSP handling code Update the interface for CTVerifier to use a base::StringPiece for the OCSP and TLS SCT extension, rather than an std::string. By allowing this to be zero-copy from the underlying SSL* that stores this information, this allows pruning the ocsp_response_ member from SSLSocketImpl, which can save an extra 2K-12K per socket for those that staple OCSP responses, and eliminate an extra copy for the CT information. As this required touching every CTVerifier-derived class, this also fixes the API wart that crept in regarding CTVerifier::Verify() having a return code. As the actual verification of policy compliance is handled not by CTVerifier but by CTPolicyEnforcer, there's no actual status code to return from CTVerifier. To make future cleanups easier, and to align the API and implementations for consistency, this also replaced the various stub verifiers that grew with explicit DoNothingCTVerifiers that skip all parsing entirely. BUG=571203 TBR=sergeyu@chromium.org Committed: https://crrev.com/22cae167148a1f2b632ff4c20f975810d4edb188 Cr-Commit-Position: refs/heads/master@{#440818}

Patch Set 1 #

Patch Set 2 : Nuke error code #

Patch Set 3 : Actually optimize for OCSP #

Total comments: 16

Patch Set 4 : Rebased #

Patch Set 5 : Review feedback #

Patch Set 6 : Review feedback round two #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -277 lines) Patch
M net/base/net_error_list.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M net/cert/ct_objects_extractor.h View 2 chunks +2 lines, -1 line 0 comments Download
M net/cert/ct_objects_extractor.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/cert/ct_objects_extractor_unittest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M net/cert/ct_serialization.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M net/cert/ct_serialization.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M net/cert/ct_serialization_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M net/cert/ct_signed_certificate_timestamp_log_param.h View 2 chunks +4 lines, -4 lines 0 comments Download
M net/cert/ct_signed_certificate_timestamp_log_param.cc View 2 chunks +9 lines, -10 lines 0 comments Download
M net/cert/ct_verifier.h View 1 2 3 4 5 2 chunks +8 lines, -9 lines 0 comments Download
M net/cert/do_nothing_ct_verifier.h View 1 chunk +7 lines, -5 lines 0 comments Download
M net/cert/do_nothing_ct_verifier.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M net/cert/multi_log_ct_verifier.h View 1 2 3 4 2 chunks +8 lines, -7 lines 1 comment Download
M net/cert/multi_log_ct_verifier.cc View 1 2 3 4 6 chunks +24 lines, -38 lines 0 comments Download
M net/cert/multi_log_ct_verifier_unittest.cc View 1 2 3 4 4 chunks +20 lines, -21 lines 0 comments Download
M net/http/transport_security_state.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/http/transport_security_state.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_impl.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 1 2 3 4 chunks +24 lines, -11 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 5 12 chunks +15 lines, -73 lines 0 comments Download
M net/socket/ssl_server_socket_unittest.cc View 1 2 3 4 chunks +3 lines, -19 lines 0 comments Download
M net/spdy/spdy_test_util_common.cc View 1 2 3 4 chunks +3 lines, -19 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 3 chunks +4 lines, -21 lines 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator.cc View 1 2 3 3 chunks +2 lines, -19 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
Ryan Sleevi
David: I'll send this to you. As you can see from the description, I grouped ...
3 years, 12 months ago (2016-12-23 01:23:08 UTC) #3
Eran Messeri
drive-by lgtm (all seems to make sense from an API perspective, thanks Ryan for removing ...
3 years, 11 months ago (2016-12-27 20:58:05 UTC) #5
eroman
lgtm after addressing these comments https://codereview.chromium.org/2604513002/diff/40001/net/cert/ct_verifier.h File net/cert/ct_verifier.h (right): https://codereview.chromium.org/2604513002/diff/40001/net/cert/ct_verifier.h#newcode46 net/cert/ct_verifier.h:46: // empty string. |result| ...
3 years, 11 months ago (2016-12-27 22:00:41 UTC) #7
Ryan Sleevi
https://codereview.chromium.org/2604513002/diff/40001/net/cert/multi_log_ct_verifier.cc File net/cert/multi_log_ct_verifier.cc (left): https://codereview.chromium.org/2604513002/diff/40001/net/cert/multi_log_ct_verifier.cc#oldcode166 net/cert/multi_log_ct_verifier.cc:166: base::StringPiece temp(encoded_sct_list); On 2016/12/27 22:00:40, eroman (slow) wrote: > ...
3 years, 11 months ago (2016-12-27 22:17:19 UTC) #8
Ryan Sleevi
Sergey: Going to TBR the mechanical change to you
3 years, 11 months ago (2016-12-28 00:38:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2604513002/100001
3 years, 11 months ago (2016-12-28 00:39:14 UTC) #15
eroman
lgtm https://codereview.chromium.org/2604513002/diff/100001/net/cert/multi_log_ct_verifier.h File net/cert/multi_log_ct_verifier.h (right): https://codereview.chromium.org/2604513002/diff/100001/net/cert/multi_log_ct_verifier.h#newcode47 net/cert/multi_log_ct_verifier.h:47: // Verify a list of SCTs from |encoded_sct_list| ...
3 years, 11 months ago (2016-12-28 01:33:50 UTC) #16
Sergey Ulanov
lgtm
3 years, 11 months ago (2016-12-28 01:42:55 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
3 years, 11 months ago (2016-12-28 01:54:08 UTC) #20
commit-bot: I haz the power
3 years, 11 months ago (2017-01-02 15:48:10 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/22cae167148a1f2b632ff4c20f975810d4edb188
Cr-Commit-Position: refs/heads/master@{#440818}

Powered by Google App Engine
This is Rietveld 408576698