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

Issue 1094983002: Account for the OS returning an empty certificate chain. (Closed)

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

Description

Account for the OS returning an empty certificate chain. OS X sometimes returns an empty certificate chain on unrecoverable certificate chain. This was leaving the verified certificate NULL and causing crashes. BUG=472291 Committed: https://crrev.com/a6173cd8139cac600957a6430afa7ab5ef12b550 Cr-Commit-Position: refs/heads/master@{#326683}

Patch Set 1 #

Patch Set 2 : sanity check #

Total comments: 1

Patch Set 3 : bah #

Patch Set 4 : third time's the charm #

Total comments: 4

Patch Set 5 : test, somewhat tidier code #

Total comments: 2

Patch Set 6 : #

Total comments: 6

Patch Set 7 : sleevi comments, also X509Certificate::GetPublicKeyInfo #

Patch Set 8 : tweak comment #

Patch Set 9 : size test cert to a multiple of 8, otherwise key size in bits is weird #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -23 lines) Patch
M net/cert/cert_verify_proc.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M net/cert/cert_verify_proc_mac.cc View 1 2 3 4 5 6 4 chunks +26 lines, -15 lines 0 comments Download
M net/cert/cert_verify_proc_unittest.cc View 1 2 3 4 5 6 1 chunk +24 lines, -0 lines 0 comments Download
M net/cert/x509_certificate_mac.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M net/cert/x509_certificate_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -6 lines 0 comments Download
A net/data/ssl/certificates/large_key.pem View 1 2 3 4 5 6 7 8 1 chunk +112 lines, -0 lines 0 comments Download
M net/data/ssl/scripts/generate-test-certs.sh View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (3 generated)
davidben
I'm not sure this is the best fix or if we should bail early (out ...
5 years, 8 months ago (2015-04-18 00:23:40 UTC) #2
Ryan Sleevi
unit test? https://codereview.chromium.org/1094983002/diff/60001/net/cert/cert_verify_proc_mac.cc File net/cert/cert_verify_proc_mac.cc (right): https://codereview.chromium.org/1094983002/diff/60001/net/cert/cert_verify_proc_mac.cc#newcode472 net/cert/cert_verify_proc_mac.cc:472: tmp_trust_result == kSecTrustResultRecoverableTrustFailure)) { Why only these ...
5 years, 8 months ago (2015-04-18 00:54:58 UTC) #3
davidben
(Will add a test once I figure out what's causing OS X to hate this ...
5 years, 8 months ago (2015-04-22 21:57:58 UTC) #4
davidben
Added a test and tidied up the code to hopefully be more understandable. Notably I ...
5 years, 8 months ago (2015-04-23 00:09:52 UTC) #5
Ryan Sleevi
Yes, it was being used. If the leaf was weak, we didn't call the chain ...
5 years, 8 months ago (2015-04-23 00:30:50 UTC) #6
davidben
On 2015/04/23 00:30:50, Ryan Sleevi wrote: > Yes, it was being used. > > If ...
5 years, 8 months ago (2015-04-23 01:00:28 UTC) #7
davidben
On 2015/04/23 01:00:28, David Benjamin (OOO sick) wrote: > On 2015/04/23 00:30:50, Ryan Sleevi wrote: ...
5 years, 8 months ago (2015-04-23 01:05:10 UTC) #8
Ryan Sleevi
On 2015/04/23 01:00:28, David Benjamin (OOO sick) wrote: > It's just an optimization, no? I ...
5 years, 8 months ago (2015-04-23 01:46:53 UTC) #9
Ryan Sleevi
On 2015/04/23 01:05:10, David Benjamin (OOO sick) wrote: > Actually, the optimization isn't *completely* right, ...
5 years, 8 months ago (2015-04-23 01:48:57 UTC) #10
davidben
On 2015/04/23 01:46:53, Ryan Sleevi wrote: > On 2015/04/23 01:00:28, David Benjamin (OOO sick) wrote: ...
5 years, 8 months ago (2015-04-23 13:40:09 UTC) #11
Ryan Sleevi
LGTM for timezone changes mod nits, but I mean, pay careful attention :) https://codereview.chromium.org/1094983002/diff/100001/net/cert/cert_verify_proc_mac.cc File ...
5 years, 8 months ago (2015-04-23 14:05:41 UTC) #12
davidben
I also had to go fix X509Certificate::GetPublicKeyInfo so PTAL. https://codereview.chromium.org/1094983002/diff/100001/net/cert/cert_verify_proc_mac.cc File net/cert/cert_verify_proc_mac.cc (right): https://codereview.chromium.org/1094983002/diff/100001/net/cert/cert_verify_proc_mac.cc#newcode579 net/cert/cert_verify_proc_mac.cc:579: ...
5 years, 8 months ago (2015-04-23 18:12:29 UTC) #13
Ryan Sleevi
lgtm
5 years, 8 months ago (2015-04-23 21:26:57 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1094983002/160001
5 years, 8 months ago (2015-04-23 22:50:59 UTC) #17
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 8 months ago (2015-04-23 22:55:16 UTC) #18
commit-bot: I haz the power
5 years, 8 months ago (2015-04-23 22:56:12 UTC) #19
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/a6173cd8139cac600957a6430afa7ab5ef12b550
Cr-Commit-Position: refs/heads/master@{#326683}

Powered by Google App Engine
This is Rietveld 408576698