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

Issue 2084783002: Cleanup HPKP error handling and weak DH key handling (Closed)

Created:
4 years, 6 months ago by Ryan Sleevi
Modified:
4 years, 6 months ago
Reviewers:
davidben, estark
CC:
chromium-reviews, cbentzel+watch_chromium.org, estark
Base URL:
https://chromium.googlesource.com/chromium/src.git@require_ct_enforcer
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup HPKP error handling and weak DH key handling HPKP and WeakDH went through special-case logic in URLRequestHttpJob to map them 'as if' they were cert verification errors. However, the WeakDH code was partially reverted, leaving half-implemented code around, and the HPKP code added an unnecessary conditional. This cleans up the WeakDH exception by removing it as a cert verification error (because it wasn't, and the CertStatus flag was reverted) and leaving it as a standard net-error (which is intrinsically non-bypassable), and removes the associated error page that wasn't. This cleans up the HPKP exception by removing the dead methods on TransportSecurityState and removing the conditional from the URLRequestHttpJob, because it's duplicating the logic that the TSS already handles. This moves the HPKP fixing up of the cert verification result from the HttpJob and into the SSL/QUIC socket code bits, which is more correct anyways, as they handle certificate verification, and HPKP belongs close to cert verification anyways. This portion of code was an artifact of when HPKP was evaluated on the URLRequestHttpJob, which it hasn't been for over four years. BUG=none R=davidben@chromium.org Committed: https://crrev.com/9545d3478138019ef62b9c9fd768766725577452 Cr-Commit-Position: refs/heads/master@{#400880}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Rebased #

Patch Set 3 : Davidben feedback #

Total comments: 3

Patch Set 4 : Fix bad test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -58 lines) Patch
M components/ssl_errors/error_info.h View 1 chunk +14 lines, -14 lines 0 comments Download
M components/ssl_errors/error_info.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M net/http/transport_security_state.h View 2 chunks +0 lines, -8 lines 0 comments Download
M net/http/transport_security_state.cc View 2 chunks +0 lines, -8 lines 0 comments Download
M net/quic/crypto/proof_verifier_chromium.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M net/quic/crypto/proof_verifier_chromium_test.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 chunk +5 lines, -15 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 22 (8 generated)
Ryan Sleevi
Emily: FYI David: I was going to put this in the RequireCT code, but it ...
4 years, 6 months ago (2016-06-20 23:59:28 UTC) #1
Ryan Sleevi
And since I'll need Emily's review for //components/ssl_errors, I should add her Emily: This code ...
4 years, 6 months ago (2016-06-21 00:11:46 UTC) #3
davidben
lgtm with comments https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc File components/ssl_errors/error_info.cc (left): https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc#oldcode135 components/ssl_errors/error_info.cc:135: details = l10n_util::GetStringFUTF16(IDS_CERT_ERROR_WEAK_KEY_DETAILS, Remove this string? ...
4 years, 6 months ago (2016-06-21 00:14:12 UTC) #5
davidben
(I assume you've confirmed with https://dh480.badssl.com/ that that error still works. I'll go try to ...
4 years, 6 months ago (2016-06-21 00:15:34 UTC) #6
Ryan Sleevi
Somehow lost estark as a reviewer https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc File components/ssl_errors/error_info.cc (left): https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc#oldcode135 components/ssl_errors/error_info.cc:135: details = l10n_util::GetStringFUTF16(IDS_CERT_ERROR_WEAK_KEY_DETAILS, ...
4 years, 6 months ago (2016-06-21 00:23:05 UTC) #8
davidben
still lgtm https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc File components/ssl_errors/error_info.cc (left): https://codereview.chromium.org/2084783002/diff/1/components/ssl_errors/error_info.cc#oldcode135 components/ssl_errors/error_info.cc:135: details = l10n_util::GetStringFUTF16(IDS_CERT_ERROR_WEAK_KEY_DETAILS, On 2016/06/21 00:23:04, Ryan ...
4 years, 6 months ago (2016-06-21 00:27:52 UTC) #9
estark
components/ssl_errors lgtm (one question inline though) https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc#newcode1087 net/url_request/url_request_http_job.cc:1087: TransportSecurityState* state = ...
4 years, 6 months ago (2016-06-21 00:29:24 UTC) #10
Ryan Sleevi
https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc#newcode1087 net/url_request/url_request_http_job.cc:1087: TransportSecurityState* state = context->transport_security_state(); On 2016/06/21 00:29:24, estark wrote: ...
4 years, 6 months ago (2016-06-21 00:39:04 UTC) #11
estark
https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/2084783002/diff/40001/net/url_request/url_request_http_job.cc#newcode1087 net/url_request/url_request_http_job.cc:1087: TransportSecurityState* state = context->transport_security_state(); On 2016/06/21 00:39:04, Ryan Sleevi ...
4 years, 6 months ago (2016-06-21 00:49:06 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2084783002/40001
4 years, 6 months ago (2016-06-21 01:38:36 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/188671)
4 years, 6 months ago (2016-06-21 02:09:20 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2084783002/60001
4 years, 6 months ago (2016-06-21 02:17:52 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-21 03:17:54 UTC) #20
commit-bot: I haz the power
4 years, 6 months ago (2016-06-21 03:20:05 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/9545d3478138019ef62b9c9fd768766725577452
Cr-Commit-Position: refs/heads/master@{#400880}

Powered by Google App Engine
This is Rietveld 408576698