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

Issue 2760723002: Check X509Certificate::CreateFromHandle result. (Closed)

Created:
3 years, 9 months ago by mattm
Modified:
3 years, 9 months ago
Reviewers:
eroman, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, mac-reviews_chromium.org, ios-reviews_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Check X509Certificate::CreateFromHandle result. Previously CreateFromHandle could not fail, as it assumed creating an OSCertHandle would validate the contents. Any errors during X509Certificate::Initialize were silently ignored. A followup change will expose errors during X509Certificate::Initialize by failing to create an X509Certificate. Further followups will invalidate the assumption that creating an "OSCertHandle" completely parses and validates the certificate data. BUG=671420 Review-Url: https://codereview.chromium.org/2760723002 Cr-Commit-Position: refs/heads/master@{#459955} Committed: https://chromium.googlesource.com/chromium/src/+/5ed988687799ba8050ecda6e69ee3b0702a9b2ae

Patch Set 1 : . #

Total comments: 1

Patch Set 2 : mac typo fix #

Patch Set 3 : rebase on updated 2755203002 #

Total comments: 12

Patch Set 4 : rebase #

Patch Set 5 : update for eroman's comments #

Total comments: 10

Patch Set 6 : 2nd round of updates #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -21 lines) Patch
M net/cert/cert_verify_proc_android.cc View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download
M net/cert/cert_verify_proc_builtin.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M net/cert/cert_verify_proc_ios.cc View 1 2 3 4 5 2 chunks +13 lines, -4 lines 2 comments Download
M net/cert/cert_verify_proc_mac.cc View 1 2 3 4 5 1 chunk +6 lines, -1 line 1 comment Download
M net/cert/cert_verify_proc_nss.cc View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M net/cert/cert_verify_proc_openssl.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M net/cert/cert_verify_proc_win.cc View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M net/cert/nss_cert_database.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M net/cert/x509_certificate.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M net/cert/x509_certificate.cc View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M net/ssl/client_cert_store_mac.cc View 2 chunks +3 lines, -1 line 0 comments Download
M net/ssl/client_cert_store_nss.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M net/ssl/client_cert_store_win.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M net/third_party/mozilla_security_manager/nsPKCS12Blob.cpp View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 48 (28 generated)
mattm
I wasn't too sure about the CertVerifyProc changes, so feel free to object or suggest ...
3 years, 9 months ago (2017-03-17 22:24:01 UTC) #8
mattm
Not sure if this got buried in your inbox or you just didn't have time ...
3 years, 9 months ago (2017-03-21 05:26:43 UTC) #17
mattm
Not sure if this got buried in your inbox or you just didn't have time ...
3 years, 9 months ago (2017-03-21 05:26:44 UTC) #18
Ryan Sleevi
Sorry, was out Monday, and in CA/B Forum through Thursday. This was one I wanted ...
3 years, 9 months ago (2017-03-21 12:36:40 UTC) #20
eroman
Can you give more context on this change? Either in the bug description, or by ...
3 years, 9 months ago (2017-03-21 21:24:47 UTC) #21
mattm
On 2017/03/21 21:24:47, eroman wrote: > Can you give more context on this change? Either ...
3 years, 9 months ago (2017-03-22 02:02:46 UTC) #23
eroman
Thanks for the extra background Matt! Can you explain a bit more why the decision ...
3 years, 9 months ago (2017-03-22 18:42:32 UTC) #24
Ryan Sleevi
On 2017/03/22 18:42:32, eroman wrote: > Thanks for the extra background Matt! > > Can ...
3 years, 9 months ago (2017-03-22 18:46:25 UTC) #25
eroman
I don't want to rehash past discussions that you already had, so maybe I am ...
3 years, 9 months ago (2017-03-22 19:37:09 UTC) #26
Ryan Sleevi
On 2017/03/22 19:37:09, eroman wrote: > But in terms of guaranteeing "validity" at the CreateFromHandle() ...
3 years, 9 months ago (2017-03-22 19:44:32 UTC) #27
eroman
We should probably continue this discussion over hangouts instead of hijacking Matt's thread :) But ...
3 years, 9 months ago (2017-03-22 20:01:36 UTC) #28
Ryan Sleevi
On 2017/03/22 20:01:36, eroman wrote: > We should probably continue this discussion over hangouts instead ...
3 years, 9 months ago (2017-03-22 20:04:31 UTC) #29
eroman
Can you update the documentation of X509Certificate::CreateFromHandle() to explain the contract (that callers need to ...
3 years, 9 months ago (2017-03-22 22:17:52 UTC) #30
mattm
updated. I also fixed the issue of setting verify_result->verified_cert to null on failure instead of ...
3 years, 9 months ago (2017-03-23 22:59:03 UTC) #33
eroman
lgtm https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_ios.cc File net/cert/cert_verify_proc_ios.cc (right): https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_ios.cc#newcode104 net/cert/cert_verify_proc_ios.cc:104: bool GetCertChainInfo(CFArrayRef cert_chain, CertVerifyResult* verify_result) { I left ...
3 years, 9 months ago (2017-03-23 23:41:32 UTC) #34
mattm
https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_ios.cc File net/cert/cert_verify_proc_ios.cc (right): https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_ios.cc#newcode104 net/cert/cert_verify_proc_ios.cc:104: bool GetCertChainInfo(CFArrayRef cert_chain, CertVerifyResult* verify_result) { On 2017/03/23 23:41:31, ...
3 years, 9 months ago (2017-03-24 21:49:35 UTC) #37
eroman
lgtm https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_win.cc File net/cert/cert_verify_proc_win.cc (right): https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_win.cc#newcode335 net/cert/cert_verify_proc_win.cc:335: return true; On 2017/03/24 21:49:35, mattm wrote: > ...
3 years, 9 months ago (2017-03-24 22:07:23 UTC) #40
mattm
https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_win.cc File net/cert/cert_verify_proc_win.cc (right): https://codereview.chromium.org/2760723002/diff/120001/net/cert/cert_verify_proc_win.cc#newcode335 net/cert/cert_verify_proc_win.cc:335: return true; On 2017/03/24 22:07:23, eroman wrote: > On ...
3 years, 9 months ago (2017-03-27 23:24:37 UTC) #43
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/2760723002/140001
3 years, 9 months ago (2017-03-27 23:25:19 UTC) #45
commit-bot: I haz the power
3 years, 9 months ago (2017-03-28 00:46:20 UTC) #48
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/5ed988687799ba8050ecda6e69ee...

Powered by Google App Engine
This is Rietveld 408576698