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

Issue 2300533002: Stop caching DER-encoded certificates unnecessarily (Closed)

Created:
4 years, 3 months ago by Ryan Sleevi
Modified:
4 years, 3 months ago
Reviewers:
Sergey Ulanov, davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, chromoting-reviews_chromium.org, DmitrySkiba
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop caching DER-encoded certificates unnecessarily What was intended as a CPU performance short-circuit in SSLClientSocket for Open/BoringSSL implementations ended up introducing rather unfortunate and significant memory overhead, thus proving yet again that premature optimization is the root of all evil. While cleaning the unnecessary DER-conversion/caching up, a further optimization to reduce the overhead of adding certificate errors was pointed out, allowing us to avoid the overhead of storing another copy of the DER-encoded certificate. As //remoting-in-NaCl can now use BoringSSL directly, this unwinds http://crrev.com/93153 and uses the cached certificate directly. BUG=642082 R=davidben@chromium.org, sergeyu@chromium.org Committed: https://crrev.com/74e99744fe3d88a5b4a759818fa813cd2d091bd7 Cr-Commit-Position: refs/heads/master@{#418352}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Feedback #

Patch Set 3 : More feedback #

Total comments: 4

Patch Set 4 : Use the right syntax #

Patch Set 5 : WIP debug #

Patch Set 6 : More debug #

Patch Set 7 : StringPiece moves #

Patch Set 8 : Remove debug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -72 lines) Patch
M net/http/http_stream_factory_impl_job.cc View 1 2 3 1 chunk +8 lines, -12 lines 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 1 2 3 4 5 6 7 2 chunks +24 lines, -25 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M net/socket/ssl_server_socket_unittest.cc View 1 2 3 1 chunk +2 lines, -7 lines 0 comments Download
M net/ssl/ssl_config.h View 1 2 3 2 chunks +4 lines, -7 lines 0 comments Download
M net/ssl/ssl_config.cc View 1 2 3 4 2 chunks +10 lines, -14 lines 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator.cc View 1 2 3 3 chunks +13 lines, -6 lines 0 comments Download

Messages

Total messages: 39 (20 generated)
Ryan Sleevi
David, Sergey: For your review Dimitry: When you pointed out the IsAllowedBadCert() DER-encoding, I realized ...
4 years, 3 months ago (2016-08-31 03:03:55 UTC) #1
Sergey Ulanov
lgtm https://codereview.chromium.org/2300533002/diff/1/remoting/protocol/ssl_hmac_channel_authenticator.cc File remoting/protocol/ssl_hmac_channel_authenticator.cc (right): https://codereview.chromium.org/2300533002/diff/1/remoting/protocol/ssl_hmac_channel_authenticator.cc#newcode309 remoting/protocol/ssl_hmac_channel_authenticator.cc:309: ssl_config.allowed_bad_certs.emplace_back(cert_and_status); Why emplace_back() instead of push_back()? Copy constructor ...
4 years, 3 months ago (2016-08-31 18:46:44 UTC) #6
davidben
https://codereview.chromium.org/2300533002/diff/1/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): https://codereview.chromium.org/2300533002/diff/1/net/http/http_stream_factory_impl_job.cc#newcode1486 net/http/http_stream_factory_impl_job.cc:1486: server_ssl_config_.allowed_bad_certs.emplace_back(bad_cert); Same comment as Sergey about why emplace_back vs ...
4 years, 3 months ago (2016-08-31 19:20:49 UTC) #7
Ryan Sleevi
https://codereview.chromium.org/2300533002/diff/1/net/socket/ssl_client_socket_impl.cc File net/socket/ssl_client_socket_impl.cc (left): https://codereview.chromium.org/2300533002/diff/1/net/socket/ssl_client_socket_impl.cc#oldcode452 net/socket/ssl_client_socket_impl.cc:452: #if defined(USE_OPENSSL_CERTS) On 2016/08/31 19:20:49, davidben wrote: > Or ...
4 years, 3 months ago (2016-08-31 20:33:13 UTC) #8
davidben
lgtm modulo further emplace_back vs push_back comments below. https://codereview.chromium.org/2300533002/diff/40001/net/http/http_stream_factory_impl_job.cc File net/http/http_stream_factory_impl_job.cc (right): https://codereview.chromium.org/2300533002/diff/40001/net/http/http_stream_factory_impl_job.cc#newcode1486 net/http/http_stream_factory_impl_job.cc:1486: server_ssl_config_.allowed_bad_certs.emplace_back(std::move(bad_cert)); ...
4 years, 3 months ago (2016-09-01 19:44:40 UTC) #9
davidben
(New emplace_back business lgtm.)
4 years, 3 months ago (2016-09-01 21:03:06 UTC) #10
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/2300533002/60001
4 years, 3 months ago (2016-09-01 21:09:19 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/134897)
4 years, 3 months ago (2016-09-01 23:06:25 UTC) #15
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/2300533002/60001
4 years, 3 months ago (2016-09-02 23:54:07 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/135702)
4 years, 3 months ago (2016-09-03 01:21:59 UTC) #19
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/2300533002/60001
4 years, 3 months ago (2016-09-03 01:42:45 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/135765)
4 years, 3 months ago (2016-09-03 02:30:25 UTC) #23
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/2300533002/60001
4 years, 3 months ago (2016-09-03 11:27:09 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/135813)
4 years, 3 months ago (2016-09-03 12:56:50 UTC) #27
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/2300533002/60001
4 years, 3 months ago (2016-09-09 18:44:06 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/28295)
4 years, 3 months ago (2016-09-09 20:16:02 UTC) #31
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/2300533002/140001
4 years, 3 months ago (2016-09-13 19:18:53 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 3 months ago (2016-09-13 20:35:49 UTC) #37
commit-bot: I haz the power
4 years, 3 months ago (2016-09-13 20:37:23 UTC) #39
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/74e99744fe3d88a5b4a759818fa813cd2d091bd7
Cr-Commit-Position: refs/heads/master@{#418352}

Powered by Google App Engine
This is Rietveld 408576698