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

Issue 11579002: Add X509Certificate::IsIssuedByEncoded() (Closed)

Created:
8 years ago by digit1
Modified:
7 years, 11 months ago
Reviewers:
droger, agl, wtc, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, sail+watch_chromium.org, ppi
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add X509Certificate::IsIssuedByEncoded() This new method is used to ensure that a given client certificate is issued by one of the CA names listed by the server, as they appear in the SSL Handshake "Certificate Request" message. The patch also adds two new X509CertificateTest unit tests, moves existing hard-coded DN tables to net/base/test_certificate_data.h to share them between multiple test sources, and adds a few new DN tables too. R=rsleevi@chromium.org,wtc@chromium.org,agl@chromium.org BUG=134418 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=176371

Patch Set 1 #

Patch Set 2 : Add missing base files (damn you git cl upload) #

Total comments: 27

Patch Set 3 : #

Patch Set 4 : Fix misc bugs. #

Patch Set 5 : try to fix mac build #

Patch Set 6 : try to fix ios build #

Patch Set 7 : another ios fix #

Patch Set 8 : another ios fix #

Total comments: 4

Patch Set 9 : Fix ios formatting #

Total comments: 16

Patch Set 10 : fix nits (unit test will be in a future patch) #

Patch Set 11 : add X509CertificateTest.IsIssuedByEncoded unit test #

Total comments: 2

Patch Set 12 : Fix nss GetIssuersFromEncodedList and IsCertificateIssuedBy #

Patch Set 13 : Add new unit test to check issuers in intermediate certificates too. #

Patch Set 14 : #

Total comments: 1

Patch Set 15 : fix bad indent #

Total comments: 4

Patch Set 16 : add negative chain test + fix documentation #

Patch Set 17 : reformat #

Patch Set 18 : simple rebase to check that everything's still ok #

Unified diffs Side-by-side diffs Delta from patch set Stats (+744 lines, -206 lines) Patch
M net/base/test_certificate_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +371 lines, -0 lines 0 comments Download
M net/base/x509_cert_types_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -205 lines 0 comments Download
M net/base/x509_certificate.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/x509_certificate_ios.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
M net/base/x509_certificate_mac.cc View 1 2 3 4 3 chunks +40 lines, -0 lines 0 comments Download
M net/base/x509_certificate_nss.cc View 1 2 3 4 5 6 7 8 9 3 chunks +21 lines, -0 lines 0 comments Download
M net/base/x509_certificate_openssl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +57 lines, -0 lines 0 comments Download
M net/base/x509_certificate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +100 lines, -0 lines 0 comments Download
M net/base/x509_certificate_win.cc View 1 2 2 chunks +41 lines, -0 lines 0 comments Download
M net/base/x509_util_ios.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M net/base/x509_util_ios.cc View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M net/base/x509_util_nss.h View 1 2 3 4 5 2 chunks +22 lines, -0 lines 0 comments Download
M net/base/x509_util_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +66 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
digit1
This patch corresponds to the change suggested by Ryan in the comments of https://chromiumcodereview.appspot.com/11458012/ This ...
8 years ago (2012-12-13 18:55:59 UTC) #1
Ryan Sleevi
Thanks digit This looks great, and is mostly ready to go. I mentioned the same ...
8 years ago (2012-12-13 19:49:05 UTC) #2
digit1
By the way, it seems that the order of RDN elements in a DER-encoded DN ...
8 years ago (2012-12-14 17:54:33 UTC) #3
agl
On Fri, Dec 14, 2012 at 12:54 PM, <digit@chromium.org> wrote: > By the way, it ...
8 years ago (2012-12-14 18:02:11 UTC) #4
Ryan Sleevi
Trim whitespace, normalize case, normalize i18n representations, do order-less comparison for the SETs and in-order ...
8 years ago (2012-12-14 18:16:41 UTC) #5
Ryan Sleevi
On Fri, Dec 14, 2012 at 9:54 AM, <digit@chromium.org> wrote: > By the way, it ...
8 years ago (2012-12-14 19:09:20 UTC) #6
digit1
https://chromiumcodereview.appspot.com/11579002/diff/3001/net/base/x509_certificate_ios.cc File net/base/x509_certificate_ios.cc (right): https://chromiumcodereview.appspot.com/11579002/diff/3001/net/base/x509_certificate_ios.cc#newcode75 net/base/x509_certificate_ios.cc:75: valid_issuers)) Thank you so much for this, I've implemented ...
8 years ago (2012-12-18 16:19:24 UTC) #7
digit1
I've added David Roger to review the iOS portion of the patch. Any reviewer recommendations ...
8 years ago (2012-12-19 12:07:43 UTC) #8
droger
LGTM https://chromiumcodereview.appspot.com/11579002/diff/20012/net/base/x509_certificate_ios.cc File net/base/x509_certificate_ios.cc (right): https://chromiumcodereview.appspot.com/11579002/diff/20012/net/base/x509_certificate_ios.cc#newcode75 net/base/x509_certificate_ios.cc:75: // Convert to scoped CERTName* list. Optional nit: ...
8 years ago (2012-12-19 12:26:23 UTC) #9
droger
Oops, ignore my first comment, it was wrong. > Optional nit: you could consider sharing ...
8 years ago (2012-12-19 12:27:26 UTC) #10
digit1
https://chromiumcodereview.appspot.com/11579002/diff/20012/net/base/x509_certificate_ios.cc File net/base/x509_certificate_ios.cc (right): https://chromiumcodereview.appspot.com/11579002/diff/20012/net/base/x509_certificate_ios.cc#newcode75 net/base/x509_certificate_ios.cc:75: // Convert to scoped CERTName* list. That's what I ...
8 years ago (2012-12-19 12:58:42 UTC) #11
Ryan Sleevi
Mostly nits. Also, please add unit tests. You can see in x509_cert_types_unittest.cc we have some ...
8 years ago (2012-12-21 22:09:50 UTC) #12
digit1
https://codereview.chromium.org/11579002/diff/31001/net/base/x509_certificate_ios.cc File net/base/x509_certificate_ios.cc (right): https://codereview.chromium.org/11579002/diff/31001/net/base/x509_certificate_ios.cc#newcode79 net/base/x509_certificate_ios.cc:79: valid_issuers, arena.get(), &issuers)) { On 2012/12/21 22:09:50, Ryan Sleevi ...
7 years, 11 months ago (2013-01-07 13:58:40 UTC) #13
digit1
The latest patch adds a unit test that is slightly limited, each tested certificate is ...
7 years, 11 months ago (2013-01-07 17:53:22 UTC) #14
Ryan Sleevi
LGTM, mod BUG below. https://chromiumcodereview.appspot.com/11579002/diff/43002/net/base/test_certificate_data.h File net/base/test_certificate_data.h (right): https://chromiumcodereview.appspot.com/11579002/diff/43002/net/base/test_certificate_data.h#newcode488 net/base/test_certificate_data.h:488: const uint8 VARIABLE_IS_NOT_USED VerisignDN[] = ...
7 years, 11 months ago (2013-01-07 18:11:13 UTC) #15
digit1
Patch set 13 adds a new unit test (and corresponding hard-coded DN tables) to check ...
7 years, 11 months ago (2013-01-08 14:25:13 UTC) #16
digit1
https://chromiumcodereview.appspot.com/11579002/diff/58014/net/base/x509_certificate_unittest.cc File net/base/x509_certificate_unittest.cc (right): https://chromiumcodereview.appspot.com/11579002/diff/58014/net/base/x509_certificate_unittest.cc#newcode394 net/base/x509_certificate_unittest.cc:394: ImportCertFromFile(certs_dir, "salesforce_com_test.pem"); mmm, I really don't know what caused ...
7 years, 11 months ago (2013-01-08 14:37:23 UTC) #17
Ryan Sleevi
https://chromiumcodereview.appspot.com/11579002/diff/58015/net/base/test_certificate_data.h File net/base/test_certificate_data.h (right): https://chromiumcodereview.appspot.com/11579002/diff/58015/net/base/test_certificate_data.h#newcode485 net/base/test_certificate_data.h:485: // Compute END - START, save it into LEN. ...
7 years, 11 months ago (2013-01-08 20:14:18 UTC) #18
digit1
https://chromiumcodereview.appspot.com/11579002/diff/58015/net/base/test_certificate_data.h File net/base/test_certificate_data.h (right): https://chromiumcodereview.appspot.com/11579002/diff/58015/net/base/test_certificate_data.h#newcode485 net/base/test_certificate_data.h:485: // Compute END - START, save it into LEN. ...
7 years, 11 months ago (2013-01-09 14:01:46 UTC) #19
digit1
Fine, since none of the failures are related to this code in any way, I'll ...
7 years, 11 months ago (2013-01-09 15:31:04 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/11579002/67002
7 years, 11 months ago (2013-01-09 15:31:38 UTC) #21
commit-bot: I haz the power
Presubmit check for 11579002-67002 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 11 months ago (2013-01-09 15:31:45 UTC) #22
digit1
On 2013/01/09 15:31:45, I haz the power (commit-bot) wrote: > Presubmit check for 11579002-67002 failed ...
7 years, 11 months ago (2013-01-09 15:35:12 UTC) #23
digit1
Failures are not related to this test, as usual. So committing now.
7 years, 11 months ago (2013-01-11 16:33:27 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/11579002/78001
7 years, 11 months ago (2013-01-11 16:33:43 UTC) #25
commit-bot: I haz the power
7 years, 11 months ago (2013-01-11 16:37:03 UTC) #26
Message was sent while issue was closed.
Change committed as 176371

Powered by Google App Engine
This is Rietveld 408576698