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

Issue 1988993002: Check self-signed certificate names and signatures (Closed)

Created:
4 years, 7 months ago by dadrian
Modified:
4 years, 6 months ago
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

Check self-signed certificate names and signatures Add unit tests for self-signed certificates with invalid name/sigs BUG=607954 Committed: https://crrev.com/da42899529b15a0fa89a072c6e46c22c11292514 Cr-Commit-Position: refs/heads/master@{#396548}

Patch Set 1 #

Patch Set 2 : Fixed test certs #

Patch Set 3 : iOS implementation first try #

Patch Set 4 : Reorder self signed tests #

Patch Set 5 : Update net.gypi for self-signed test certs #

Patch Set 6 : Document test case cert generation #

Patch Set 7 : forgot to update net.gypi #

Patch Set 8 : First attempt at windows #

Patch Set 9 : Fix windows build #

Patch Set 10 : Fix OpenSSL build #

Patch Set 11 : OpenSSL fixes again #

Patch Set 12 : Windows build fixes #

Patch Set 13 : Windows bug fixes #

Patch Set 14 : More Windows bugfixes #

Total comments: 16

Patch Set 15 : Address initial comments #

Patch Set 16 : Bugfixes for changes from initial comments #

Total comments: 2

Patch Set 17 : Formatting nits #

Total comments: 25

Patch Set 18 : Address comments from rsleevi@ #

Patch Set 19 : Fix compilation on Windows #

Patch Set 20 : Remove dependency on openssl -text format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -15 lines) Patch
M net/cert/x509_certificate_ios.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -3 lines 0 comments Download
M net/cert/x509_certificate_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -2 lines 0 comments Download
M net/cert/x509_certificate_openssl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -3 lines 0 comments Download
M net/cert/x509_certificate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -0 lines 0 comments Download
M net/cert/x509_certificate_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +8 lines, -7 lines 0 comments Download
M net/data/ssl/certificates/README View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A net/data/ssl/certificates/self-signed-invalid-name.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +69 lines, -0 lines 0 comments Download
A net/data/ssl/certificates/self-signed-invalid-sig.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +69 lines, -0 lines 0 comments Download
M net/data/ssl/scripts/ee.cnf View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A net/data/ssl/scripts/generate-bad-self-signed.sh View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +77 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (8 generated)
dadrian
Adding estark@ and svaldez@ as initial reviewers, per request from estark@
4 years, 7 months ago (2016-05-20 17:42:03 UTC) #3
svaldez
Some comments from a first pass. https://codereview.chromium.org/1988993002/diff/260001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/260001/net/cert/x509_certificate_ios.cc#newcode475 net/cert/x509_certificate_ios.cc:475: if (X509_check_issued(cert.get(), cert.get()) ...
4 years, 7 months ago (2016-05-20 17:54:53 UTC) #4
estark
Thanks! Totally didn't think about how gnarly the test data was going to be when ...
4 years, 7 months ago (2016-05-20 18:37:53 UTC) #5
dadrian
https://codereview.chromium.org/1988993002/diff/260001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/260001/net/cert/x509_certificate_ios.cc#newcode471 net/cert/x509_certificate_ios.cc:471: if ((X509_verify(cert.get(), scoped_key.get())) != 1) { On 2016/05/20 18:37:53, ...
4 years, 7 months ago (2016-05-20 19:01:22 UTC) #6
svaldez
lgtm
4 years, 7 months ago (2016-05-23 20:36:51 UTC) #7
estark
lgtm with one more nit Ryan Sleevi's probably the best owner to review this, so ...
4 years, 7 months ago (2016-05-24 03:40:17 UTC) #8
svaldez
https://codereview.chromium.org/1988993002/diff/300001/net/cert/x509_certificate_nss.cc File net/cert/x509_certificate_nss.cc (right): https://codereview.chromium.org/1988993002/diff/300001/net/cert/x509_certificate_nss.cc#newcode294 net/cert/x509_certificate_nss.cc:294: return c == SECComparison::SECEqual; nit: You could almost just ...
4 years, 7 months ago (2016-05-24 14:18:01 UTC) #9
dadrian
rsleevi@chromium.org: Please review changes to how self-signed certificates are identified.
4 years, 7 months ago (2016-05-25 16:38:53 UTC) #11
Ryan Sleevi
Emily: Curious your thoughts about doing the munging native (e.g. no need to generate independent ...
4 years, 7 months ago (2016-05-26 07:57:09 UTC) #12
estark
https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc#newcode473 net/cert/x509_certificate_ios.cc:473: // NOTE: x509_check_issued returns X509_V_OK in case of success ...
4 years, 7 months ago (2016-05-26 16:26:51 UTC) #13
Ryan Sleevi
https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh File net/data/ssl/scripts/generate-bad-self-signed.sh (right): https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh#newcode62 net/data/ssl/scripts/generate-bad-self-signed.sh:62: | openssl x509 -inform DER -outform PEM -out out/self-signed-invalid-sig.pem ...
4 years, 7 months ago (2016-05-26 16:34:56 UTC) #14
Ryan Sleevi
https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc#newcode473 net/cert/x509_certificate_ios.cc:473: // NOTE: x509_check_issued returns X509_V_OK in case of success ...
4 years, 7 months ago (2016-05-26 16:36:42 UTC) #15
dadrian
https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh File net/data/ssl/scripts/generate-bad-self-signed.sh (right): https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh#newcode62 net/data/ssl/scripts/generate-bad-self-signed.sh:62: | openssl x509 -inform DER -outform PEM -out out/self-signed-invalid-sig.pem ...
4 years, 7 months ago (2016-05-26 18:41:36 UTC) #16
estark
https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc#newcode473 net/cert/x509_certificate_ios.cc:473: // NOTE: x509_check_issued returns X509_V_OK in case of success ...
4 years, 7 months ago (2016-05-27 00:59:13 UTC) #17
dadrian
https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc File net/cert/x509_certificate_ios.cc (right): https://codereview.chromium.org/1988993002/diff/320001/net/cert/x509_certificate_ios.cc#newcode473 net/cert/x509_certificate_ios.cc:473: // NOTE: x509_check_issued returns X509_V_OK in case of success ...
4 years, 7 months ago (2016-05-27 01:05:03 UTC) #18
dadrian
https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh File net/data/ssl/scripts/generate-bad-self-signed.sh (right): https://codereview.chromium.org/1988993002/diff/320001/net/data/ssl/scripts/generate-bad-self-signed.sh#newcode62 net/data/ssl/scripts/generate-bad-self-signed.sh:62: | openssl x509 -inform DER -outform PEM -out out/self-signed-invalid-sig.pem ...
4 years, 7 months ago (2016-05-27 01:22:57 UTC) #19
Ryan Sleevi
Going OOO, so I'm going to defer the test bit to eroman, since he's looked ...
4 years, 7 months ago (2016-05-27 04:28:31 UTC) #21
eroman
- I like that there are unit-tests - I like that the tests are expressed ...
4 years, 7 months ago (2016-05-27 07:59:37 UTC) #22
dadrian
On 2016/05/27 07:59:37, eroman wrote: > - I like that there are unit-tests > > ...
4 years, 6 months ago (2016-05-27 18:48:15 UTC) #23
eroman
On Fri, May 27, 2016 at 11:48 AM, <dadrian@google.com> wrote: > On 2016/05/27 07:59:37, eroman ...
4 years, 6 months ago (2016-05-27 18:51:55 UTC) #24
eroman
lgtm
4 years, 6 months ago (2016-05-27 18:55:08 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988993002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988993002/380001
4 years, 6 months ago (2016-05-27 19:02:10 UTC) #28
commit-bot: I haz the power
Committed patchset #20 (id:380001)
4 years, 6 months ago (2016-05-27 20:11:31 UTC) #30
commit-bot: I haz the power
4 years, 6 months ago (2016-05-27 20:14:34 UTC) #32
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/da42899529b15a0fa89a072c6e46c22c11292514
Cr-Commit-Position: refs/heads/master@{#396548}

Powered by Google App Engine
This is Rietveld 408576698