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

Issue 1541213002: Adding OCSP Parser (Closed)

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

Description

Addition of an OCSP parser using the net der code. BUG= Committed: https://crrev.com/be4817807690ad47baa4e87a9fb538bca04649f8 Cr-Commit-Position: refs/heads/master@{#383085}

Patch Set 1 #

Patch Set 2 : Adding initial unittest. #

Total comments: 15

Patch Set 3 : Fixing comments. #

Patch Set 4 : Simplify GT parsing. #

Patch Set 5 : Simplify parsing. #

Patch Set 6 : Adding initial signature verification. #

Patch Set 7 : Making parser lazier. #

Patch Set 8 : Adding verification of response. #

Patch Set 9 : Use issuer CA. #

Patch Set 10 : Add algorithms. #

Patch Set 11 : OCSP Change #

Patch Set 12 : Moving files around. #

Patch Set 13 : Undo nacl source. #

Patch Set 14 : Fix break condition. #

Total comments: 72

Patch Set 15 : Fixing comments. #

Patch Set 16 : Fix name for issuer_cert. #

Patch Set 17 : Adding tests and fixing bugs. #

Patch Set 18 : Fix serial number parsing. #

Total comments: 69

Patch Set 19 : Add fixes from testing. #

Patch Set 20 : Fixing comments. #

Patch Set 21 : Moving Verify to end. #

Total comments: 39

Patch Set 22 : Adding comments to test files. #

Patch Set 23 : Add note about DEFAULT strictness. #

Total comments: 22

Patch Set 24 : Fixing cert comments. #

Total comments: 5

Patch Set 25 : Adding version check. #

Patch Set 26 : Removing verification. #

Total comments: 13

Patch Set 27 : Updating response extraction. #

Patch Set 28 : Fixing comments and removing VERIFY unittests. #

Total comments: 8

Patch Set 29 : Fixing last comments. #

Patch Set 30 : Rebase. #

Patch Set 31 : Rebase fix. #

Patch Set 32 : Fix compile. #

Patch Set 33 : Fix compile. #

Patch Set 34 : Fixing bad path checking in compilers. #

Patch Set 35 : More fixing. #

Patch Set 36 : Fix more null checks. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4026 lines, -55 lines) Patch
A net/cert/internal/parse_ocsp.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +282 lines, -0 lines 0 comments Download
A net/cert/internal/parse_ocsp.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +532 lines, -0 lines 0 comments Download
A net/cert/internal/parse_ocsp_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 1 chunk +177 lines, -0 lines 0 comments Download
M net/cert/internal/signature_algorithm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +15 lines, -0 lines 0 comments Download
M net/cert/internal/signature_algorithm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +31 lines, -43 lines 0 comments Download
A + net/data/parse_ocsp_unittest/annotate_test_data.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +20 lines, -11 lines 0 comments Download
A net/data/parse_ocsp_unittest/bad_ocsp_type.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/bad_signature.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +121 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/bad_status.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +91 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/good_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/good_response_next_update.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +125 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/has_extension.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +124 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/has_single_extension.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +124 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/has_version.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/malformed_status.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +91 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/missing_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +112 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/multiple_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +133 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/no_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +112 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/ocsp_extra_certs.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +205 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/ocsp_sign_bad_indirect.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +163 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/ocsp_sign_direct.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/ocsp_sign_indirect.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +168 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/ocsp_sign_indirect_missing.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/other_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +135 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/responder_id.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +119 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/responder_name.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/revoke_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +124 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/revoke_response_reason.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +126 lines, -0 lines 0 comments Download
A net/data/parse_ocsp_unittest/unknown_response.pem View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +123 lines, -0 lines 0 comments Download
M net/der/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +17 lines, -1 line 0 comments Download
M net/der/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +14 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +1 line, -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 20 21 22 23 24 25 26 27 28 29 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (13 generated)
svaldez
Mostly FYI for now. Still working on tests and adding comments.
4 years, 11 months ago (2015-12-30 18:18:43 UTC) #1
Ryan Sleevi
Quick drive by. The biggest question will be the high-level approach to whether or not ...
4 years, 11 months ago (2015-12-30 18:55:18 UTC) #4
svaldez
Yeah, we should probably have similar patterns in how we parse ASN.1. My original reason ...
4 years, 11 months ago (2015-12-30 19:31:37 UTC) #5
svaldez
Fixed the issues.
4 years, 11 months ago (2016-01-11 18:01:40 UTC) #6
svaldez
On 2016/01/11 18:01:40, svaldez wrote: > Fixed the issues. Commented on the wrong CL.
4 years, 11 months ago (2016-01-11 18:02:11 UTC) #7
svaldez
On 2016/01/11 18:02:11, svaldez wrote: > On 2016/01/11 18:01:40, svaldez wrote: > > Fixed the ...
4 years, 11 months ago (2016-01-12 19:25:35 UTC) #8
svaldez
On 2016/01/12 19:25:35, svaldez wrote: > On 2016/01/11 18:02:11, svaldez wrote: > > On 2016/01/11 ...
4 years, 11 months ago (2016-01-20 18:05:38 UTC) #9
svaldez
4 years, 11 months ago (2016-01-25 21:48:06 UTC) #11
eroman
https://codereview.chromium.org/1541213002/diff/260001/net/cert/ocsp_parser.cc File net/cert/ocsp_parser.cc (right): https://codereview.chromium.org/1541213002/diff/260001/net/cert/ocsp_parser.cc#newcode1 net/cert/ocsp_parser.cc:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 10 months ago (2016-02-03 22:54:46 UTC) #12
svaldez
https://codereview.chromium.org/1541213002/diff/260001/net/cert/ocsp_parser.cc File net/cert/ocsp_parser.cc (right): https://codereview.chromium.org/1541213002/diff/260001/net/cert/ocsp_parser.cc#newcode1 net/cert/ocsp_parser.cc:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 10 months ago (2016-02-04 19:03:25 UTC) #13
svaldez
Added a bunch of tests and fixed resulting bugs.
4 years, 10 months ago (2016-02-09 21:01:37 UTC) #14
eroman
thanks, will give it another review pass this afternoon ...
4 years, 10 months ago (2016-02-10 20:37:15 UTC) #15
eroman
https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.cc#newcode22 net/cert/internal/parse_ocsp.cc:22: bool ParseOCSPStatus(der::Parser* parser, OCSPCertStatus* out) { I would find ...
4 years, 10 months ago (2016-02-13 00:56:51 UTC) #16
svaldez
https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.cc#newcode22 net/cert/internal/parse_ocsp.cc:22: bool ParseOCSPStatus(der::Parser* parser, OCSPCertStatus* out) { On 2016/02/13 00:56:50, ...
4 years, 10 months ago (2016-02-16 17:25:12 UTC) #17
eroman
the parsing code looks good. https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.h File net/cert/internal/parse_ocsp.h (right): https://codereview.chromium.org/1541213002/diff/340001/net/cert/internal/parse_ocsp.h#newcode228 net/cert/internal/parse_ocsp.h:228: const OCSPResponse* response, On ...
4 years, 10 months ago (2016-02-16 23:42:26 UTC) #18
svaldez
https://codereview.chromium.org/1541213002/diff/400001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/400001/net/cert/internal/parse_ocsp.cc#newcode70 net/cert/internal/parse_ocsp.cc:70: if (out->serial_number.Length() == 21 && On 2016/02/16 23:42:26, eroman ...
4 years, 10 months ago (2016-02-17 16:46:47 UTC) #19
svaldez
https://codereview.chromium.org/1541213002/diff/400001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/400001/net/cert/internal/parse_ocsp.cc#newcode270 net/cert/internal/parse_ocsp.cc:270: // ignored since many implementations include them. On 2016/02/17 ...
4 years, 10 months ago (2016-02-17 18:12:20 UTC) #20
eroman
https://codereview.chromium.org/1541213002/diff/440001/net/cert/internal/parse_ocsp.h File net/cert/internal/parse_ocsp.h (right): https://codereview.chromium.org/1541213002/diff/440001/net/cert/internal/parse_ocsp.h#newcode91 net/cert/internal/parse_ocsp.h:91: A_COMPROMISE = 10, why not AA_COMPROMISE? the aa i ...
4 years, 10 months ago (2016-02-19 02:27:34 UTC) #21
svaldez
https://codereview.chromium.org/1541213002/diff/440001/net/cert/internal/parse_ocsp.h File net/cert/internal/parse_ocsp.h (right): https://codereview.chromium.org/1541213002/diff/440001/net/cert/internal/parse_ocsp.h#newcode91 net/cert/internal/parse_ocsp.h:91: A_COMPROMISE = 10, On 2016/02/19 02:27:33, eroman wrote: > ...
4 years, 10 months ago (2016-02-19 15:13:55 UTC) #22
eroman
https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc#newcode266 net/cert/internal/parse_ocsp.cc:266: if (!version_parser.ReadUint8(&(out->version))) Where is the version number being checked? ...
4 years, 10 months ago (2016-02-23 22:29:03 UTC) #23
svaldez
https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc#newcode266 net/cert/internal/parse_ocsp.cc:266: if (!version_parser.ReadUint8(&(out->version))) On 2016/02/23 22:29:03, eroman wrote: > Where ...
4 years, 10 months ago (2016-02-24 16:44:38 UTC) #24
eroman
https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc#newcode519 net/cert/internal/parse_ocsp.cc:519: // Verify Code Below (MOVING TO SEPARATE CL) On ...
4 years, 10 months ago (2016-02-25 00:15:59 UTC) #25
svaldez
On 2016/02/25 00:15:59, eroman wrote: > https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc > File net/cert/internal/parse_ocsp.cc (right): > > https://codereview.chromium.org/1541213002/diff/460001/net/cert/internal/parse_ocsp.cc#newcode519 > ...
4 years, 10 months ago (2016-02-25 16:03:45 UTC) #26
eroman
https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc#newcode445 net/cert/internal/parse_ocsp.cc:445: // issuer |issuer| and serial number |serial_number|. This would ...
4 years, 9 months ago (2016-03-04 02:23:36 UTC) #27
svaldez
https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc#newcode445 net/cert/internal/parse_ocsp.cc:445: // issuer |issuer| and serial number |serial_number|. On 2016/03/04 ...
4 years, 9 months ago (2016-03-04 15:51:07 UTC) #28
eroman
https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc#newcode503 net/cert/internal/parse_ocsp.cc:503: for (const auto& response : response_data.responses) { On 2016/03/04 ...
4 years, 9 months ago (2016-03-04 17:49:00 UTC) #29
svaldez
On 2016/03/04 17:49:00, eroman wrote: > https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc > File net/cert/internal/parse_ocsp.cc (right): > > https://codereview.chromium.org/1541213002/diff/500001/net/cert/internal/parse_ocsp.cc#newcode503 > ...
4 years, 9 months ago (2016-03-04 17:54:47 UTC) #30
eroman
Can you add documentation to that function, and references to the spec to justify its ...
4 years, 9 months ago (2016-03-04 17:56:11 UTC) #31
svaldez
Done.
4 years, 9 months ago (2016-03-04 21:46:09 UTC) #32
svaldez
Just checking whether this was waiting on me?
4 years, 9 months ago (2016-03-22 17:14:09 UTC) #33
eroman
Forgot about this, let me give it a final pass
4 years, 9 months ago (2016-03-22 17:26:31 UTC) #34
eroman
lgtm https://codereview.chromium.org/1541213002/diff/540001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/540001/net/cert/internal/parse_ocsp.cc#newcode436 net/cert/internal/parse_ocsp.cc:436: memcpy(value_hash.data(), hash_string.data(), value_hash.size()); Could avoid a memcpy here, ...
4 years, 9 months ago (2016-03-22 21:57:02 UTC) #35
svaldez
https://codereview.chromium.org/1541213002/diff/540001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/1541213002/diff/540001/net/cert/internal/parse_ocsp.cc#newcode436 net/cert/internal/parse_ocsp.cc:436: memcpy(value_hash.data(), hash_string.data(), value_hash.size()); On 2016/03/22 21:57:01, eroman wrote: > ...
4 years, 9 months ago (2016-03-23 15:10:12 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1541213002/650001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1541213002/650001
4 years, 9 months ago (2016-03-24 14:26:02 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/40103)
4 years, 9 months ago (2016-03-24 14:37:00 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1541213002/670001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1541213002/670001
4 years, 9 months ago (2016-03-24 15:29:54 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/193873)
4 years, 9 months ago (2016-03-24 15:52:35 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1541213002/690001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1541213002/690001
4 years, 9 months ago (2016-03-24 15:57:18 UTC) #49
commit-bot: I haz the power
Committed patchset #36 (id:690001)
4 years, 9 months ago (2016-03-24 17:16:42 UTC) #51
commit-bot: I haz the power
4 years, 9 months ago (2016-03-24 17:18:29 UTC) #53
Message was sent while issue was closed.
Patchset 36 (id:??) landed as
https://crrev.com/be4817807690ad47baa4e87a9fb538bca04649f8
Cr-Commit-Position: refs/heads/master@{#383085}

Powered by Google App Engine
This is Rietveld 408576698