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

Issue 1279963003: Add a function for parsing RFC 5280's "TBSCertificate". (Closed)

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

Description

Add a function for parsing RFC 5280's "TBSCertificate". BUG=410574 Committed: https://crrev.com/357ec5b3c222e728632cdbd44ed382fc1f193675 Cr-Commit-Position: refs/heads/master@{#344109}

Patch Set 1 #

Patch Set 2 : rename some vars #

Patch Set 3 : Fully move expectations to test data #

Total comments: 31

Patch Set 4 : Rebase on new test_helpers (simplifies PEM reading code) #

Patch Set 5 : Separate the testing of Certificate and TBSCertificate #

Patch Set 6 : Address David's comments #

Patch Set 7 : Remove Certificate parsing (this is now just about TBSCertificate) #

Patch Set 8 : rebase #

Patch Set 9 : Enforce most things (except extensions) are SEQUENCE #

Patch Set 10 : Enforce extensions_tlv is a SEQUENCE #

Patch Set 11 : Add more tests #

Patch Set 12 : rebase onto master #

Total comments: 22

Patch Set 13 : Use ParseInteger method #

Patch Set 14 : Moare review comments #

Patch Set 15 : Add tbs_real.pem #

Patch Set 16 : rename tbs_real.pem --> tbs_v3_real.pem #

Patch Set 17 : rebase #

Patch Set 18 : Add more tests (for v2's optional fields) #

Patch Set 19 : fix comment #

Patch Set 20 : more reformatting #

Total comments: 8

Patch Set 21 : rebase and address some more comments #

Patch Set 22 : one more comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1724 lines, -7 lines) Patch
M net/cert/internal/parse_certificate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +141 lines, -1 line 0 comments Download
M net/cert/internal/parse_certificate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +216 lines, -0 lines 0 comments Download
M net/cert/internal/parse_certificate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +169 lines, -3 lines 0 comments Download
M net/cert/internal/test_helpers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -2 lines 0 comments Download
M net/cert/internal/test_helpers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
A net/data/parse_certificate_unittest/tbs_explicit_v1.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +25 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_negative_serial_number.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +81 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_serial_number_21_octets_leading_0.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +26 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_serial_number_26_octets.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +26 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v1.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +78 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v1_extensions.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +26 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v2_extensions.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +28 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v2_issuer_and_subject_unique_id.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +95 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v2_issuer_unique_id.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +87 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v2_no_optionals.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +80 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_all_optionals.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +107 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_data_after_extensions.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +29 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_extensions.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +96 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_extensions_not_sequence.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +27 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_no_optionals.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +83 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v3_real.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +269 lines, -0 lines 0 comments Download
A net/data/parse_certificate_unittest/tbs_v4.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +25 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 22 (3 generated)
eroman
I am still in the process of adding unit-tests, but would appreciate an initial review ...
5 years, 4 months ago (2015-08-07 05:27:22 UTC) #2
davidben
Some initial comments. Looks pretty reasonable I think? https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc#newcode21 net/cert/internal/parse_certificate.cc:21: // ...
5 years, 4 months ago (2015-08-11 20:31:57 UTC) #3
eroman
Thanks for the initial look over! https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc#newcode21 net/cert/internal/parse_certificate.cc:21: // certificate versions ...
5 years, 4 months ago (2015-08-11 21:13:34 UTC) #4
davidben
https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc#newcode21 net/cert/internal/parse_certificate.cc:21: // certificate versions in use today): On 2015/08/11 21:13:33, ...
5 years, 4 months ago (2015-08-11 22:39:21 UTC) #5
eroman
https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.cc#newcode21 net/cert/internal/parse_certificate.cc:21: // certificate versions in use today): On 2015/08/11 22:39:20, ...
5 years, 4 months ago (2015-08-12 00:37:10 UTC) #6
davidben
https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.h File net/cert/internal/parse_certificate.h (right): https://codereview.chromium.org/1279963003/diff/20001/net/cert/internal/parse_certificate.h#newcode70 net/cert/internal/parse_certificate.h:70: struct NET_EXPORT ParsedCertificate { On 2015/08/11 21:13:34, eroman wrote: ...
5 years, 4 months ago (2015-08-12 16:20:59 UTC) #7
eroman
I split the Certificate parsing to a separate CL (https://codereview.chromium.org/1288193003/) and kept this just about ...
5 years, 4 months ago (2015-08-13 00:31:46 UTC) #8
davidben
https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc#newcode84 net/cert/internal/parse_certificate.cc:84: // For reference, here is what RFC 5280 section ...
5 years, 4 months ago (2015-08-14 17:51:43 UTC) #9
eroman
https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc#newcode122 net/cert/internal/parse_certificate.cc:122: } On 2015/08/14 17:51:42, David Benjamin wrote: > If ...
5 years, 4 months ago (2015-08-14 18:11:59 UTC) #10
davidben
https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc#newcode122 net/cert/internal/parse_certificate.cc:122: } On 2015/08/14 18:11:59, eroman wrote: > On 2015/08/14 ...
5 years, 4 months ago (2015-08-14 18:19:22 UTC) #11
eroman
https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate.cc#newcode122 net/cert/internal/parse_certificate.cc:122: } On 2015/08/14 18:19:22, David Benjamin wrote: > On ...
5 years, 4 months ago (2015-08-14 21:26:13 UTC) #12
eroman
https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate_unittest.cc File net/cert/internal/parse_certificate_unittest.cc (right): https://codereview.chromium.org/1279963003/diff/170001/net/cert/internal/parse_certificate_unittest.cc#newcode155 net/cert/internal/parse_certificate_unittest.cc:155: EXPECT_FALSE(parsed.has_subject_unique_id); On 2015/08/14 21:26:13, eroman wrote: > On 2015/08/14 ...
5 years, 4 months ago (2015-08-15 01:57:41 UTC) #13
davidben
lgtm! https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc#newcode113 net/cert/internal/parse_certificate.cc:113: has_extensions(false) {} Optional: Non-static initializers are allowed now, ...
5 years, 4 months ago (2015-08-17 21:16:02 UTC) #14
eroman
https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc#newcode113 net/cert/internal/parse_certificate.cc:113: has_extensions(false) {} On 2015/08/17 21:16:02, David Benjamin wrote: > ...
5 years, 4 months ago (2015-08-18 00:20:50 UTC) #15
davidben
https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc#newcode113 net/cert/internal/parse_certificate.cc:113: has_extensions(false) {} On 2015/08/18 00:20:50, eroman wrote: > On ...
5 years, 4 months ago (2015-08-18 00:22:56 UTC) #16
eroman
https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc File net/cert/internal/parse_certificate.cc (right): https://codereview.chromium.org/1279963003/diff/330001/net/cert/internal/parse_certificate.cc#newcode113 net/cert/internal/parse_certificate.cc:113: has_extensions(false) {} On 2015/08/18 00:22:56, David Benjamin wrote: > ...
5 years, 4 months ago (2015-08-18 00:35:52 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1279963003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1279963003/360001
5 years, 4 months ago (2015-08-18 23:56:16 UTC) #20
commit-bot: I haz the power
Committed patchset #22 (id:360001)
5 years, 4 months ago (2015-08-19 01:03:57 UTC) #21
commit-bot: I haz the power
5 years, 4 months ago (2015-08-19 01:04:48 UTC) #22
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/357ec5b3c222e728632cdbd44ed382fc1f193675
Cr-Commit-Position: refs/heads/master@{#344109}

Powered by Google App Engine
This is Rietveld 408576698