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

Issue 2091103002: Add CheckOCSPDateValid() to net/cert/internal (Closed)

Created:
4 years, 6 months ago by dadrian
Modified:
4 years, 5 months ago
Reviewers:
svaldez, Ryan Sleevi, estark
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

Add CheckOCSPDateValid() to net/cert/internal Intended to be used internally by certificate validation as part of OCSP validity checks and Expect-Staple. BUG=598021 Committed: https://crrev.com/687cf9fffda1a7eb45c80a596fa4f9e3e524f0e4 Cr-Commit-Position: refs/heads/master@{#404708}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address comments #

Total comments: 6

Patch Set 3 : Add tests for ConvertBaseUTCTime #

Total comments: 29

Patch Set 4 : Address comments from rsleevi@ #

Total comments: 8

Patch Set 5 : Readable unit tests #

Patch Set 6 : EncodeGeneralizedTime can fail #

Patch Set 7 : Return a bool #

Patch Set 8 : Add tests for Windows edge cases #

Patch Set 9 : Fix compilation #

Total comments: 6

Patch Set 10 : All hail the style guide. #

Patch Set 11 : Fix compilation error. #

Total comments: 6

Patch Set 12 : Nits. #

Patch Set 13 : Remove extra include. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+293 lines, -0 lines) Patch
M net/cert/internal/parse_ocsp.h View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M net/cert/internal/parse_ocsp.cc View 1 2 3 4 5 2 chunks +25 lines, -0 lines 0 comments Download
M net/cert/internal/parse_ocsp_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +130 lines, -0 lines 0 comments Download
A net/der/encode_values.h View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
A net/der/encode_values.cc View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download
A net/der/encode_values_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +63 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (10 generated)
dadrian
rsleevi@: I'm starting to pull apart https://codereview.chromium.org/2040513003/ per your suggestion in chat, and will rebase ...
4 years, 6 months ago (2016-06-23 20:53:52 UTC) #2
Ryan Sleevi
Happy to let Steven drive this review https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.cc#newcode541 net/cert/internal/parse_ocsp.cc:541: der::GeneralizedTime verify_time_der ...
4 years, 6 months ago (2016-06-23 21:27:35 UTC) #3
estark
https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.h File net/cert/internal/parse_ocsp.h (right): https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.h#newcode12 net/cert/internal/parse_ocsp.h:12: #include "base/time/time.h" should be able to forward-declare this https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.h#newcode283 ...
4 years, 6 months ago (2016-06-24 00:27:36 UTC) #4
dadrian
https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/1/net/cert/internal/parse_ocsp.cc#newcode541 net/cert/internal/parse_ocsp.cc:541: der::GeneralizedTime verify_time_der = der::ConvertBaseUTCTime(verify_time); On 2016/06/23 21:27:35, Ryan Sleevi ...
4 years, 6 months ago (2016-06-24 01:41:52 UTC) #5
svaldez
https://codereview.chromium.org/2091103002/diff/1/net/der/parse_values.cc File net/der/parse_values.cc (right): https://codereview.chromium.org/2091103002/diff/1/net/der/parse_values.cc#newcode386 net/der/parse_values.cc:386: der::GeneralizedTime ConvertBaseUTCTime(const base::Time& time) { Might need a basic ...
4 years, 5 months ago (2016-06-24 13:40:47 UTC) #6
dadrian
https://codereview.chromium.org/2091103002/diff/20001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/20001/net/cert/internal/parse_ocsp.cc#newcode545 net/cert/internal/parse_ocsp.cc:545: if (response.has_next_update && (response.next_update <= verify_time_der)) On 2016/06/24 13:40:46, ...
4 years, 5 months ago (2016-06-24 17:16:14 UTC) #7
svaldez
lgtm
4 years, 5 months ago (2016-06-27 13:41:33 UTC) #8
dadrian
On 2016/06/27 13:41:33, svaldez wrote: > lgtm rsleevi: Does this look good to you as ...
4 years, 5 months ago (2016-06-27 20:32:43 UTC) #9
Ryan Sleevi
https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc#newcode537 net/cert/internal/parse_ocsp.cc:537: // Enforce thisUpdate <= |verify_time|. Unnecessary comment https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc#newcode538 net/cert/internal/parse_ocsp.cc:538: ...
4 years, 5 months ago (2016-06-28 17:33:30 UTC) #10
dadrian
https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc#newcode538 net/cert/internal/parse_ocsp.cc:538: if (response.this_update > verify_time_der) On 2016/06/28 17:33:29, Ryan Sleevi ...
4 years, 5 months ago (2016-06-28 19:15:27 UTC) #11
Ryan Sleevi
https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc#newcode544 net/cert/internal/parse_ocsp.cc:544: if (response.this_update <= lower_bound) On 2016/06/28 19:15:27, dadrian wrote: ...
4 years, 5 months ago (2016-06-28 19:26:44 UTC) #12
dadrian
https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc File net/cert/internal/parse_ocsp.cc (right): https://codereview.chromium.org/2091103002/diff/40001/net/cert/internal/parse_ocsp.cc#newcode537 net/cert/internal/parse_ocsp.cc:537: // Enforce thisUpdate <= |verify_time|. On 2016/06/28 17:33:30, Ryan ...
4 years, 5 months ago (2016-06-29 22:54:03 UTC) #13
Ryan Sleevi
https://codereview.chromium.org/2091103002/diff/60001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/60001/net/cert/internal/parse_ocsp_unittest.cc#newcode198 net/cert/internal/parse_ocsp_unittest.cc:198: EXPECT_TRUE(CheckOCSPDateValid(response, now, kOCSPAgeOneWeek)); Reading each of these tests, I ...
4 years, 5 months ago (2016-07-01 00:49:53 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2091103002/60001
4 years, 5 months ago (2016-07-01 00:50:15 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/248973)
4 years, 5 months ago (2016-07-01 01:43:44 UTC) #18
dadrian
https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc File net/der/encode_values.cc (right): https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc#newcode14 net/der/encode_values.cc:14: time.UTCExplode(&exploded); On 2016/07/01 00:49:53, Ryan Sleevi wrote: > DESIGN: ...
4 years, 5 months ago (2016-07-01 17:13:43 UTC) #19
dadrian
https://codereview.chromium.org/2091103002/diff/60001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/60001/net/cert/internal/parse_ocsp_unittest.cc#newcode234 net/cert/internal/parse_ocsp_unittest.cc:234: EXPECT_FALSE(CheckOCSPDateValid(response, now, kOCSPAgeOneWeek)); On 2016/07/01 00:49:53, Ryan Sleevi wrote: ...
4 years, 5 months ago (2016-07-01 17:47:38 UTC) #20
Ryan Sleevi
https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc File net/der/encode_values.cc (right): https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc#newcode14 net/der/encode_values.cc:14: time.UTCExplode(&exploded); On 2016/07/01 17:13:43, dadrian wrote: > On 2016/07/01 ...
4 years, 5 months ago (2016-07-01 17:58:07 UTC) #21
dadrian
https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc File net/der/encode_values.cc (right): https://codereview.chromium.org/2091103002/diff/60001/net/der/encode_values.cc#newcode14 net/der/encode_values.cc:14: time.UTCExplode(&exploded); On 2016/07/01 17:58:07, Ryan Sleevi wrote: > On ...
4 years, 5 months ago (2016-07-01 18:41:11 UTC) #22
Ryan Sleevi
Sorry about the delay; hopefully this helps progress? https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc#newcode23 net/cert/internal/parse_ocsp_unittest.cc:23: base::TimeDelta::FromSeconds(INT64_C(11644473600)); ...
4 years, 5 months ago (2016-07-08 02:21:02 UTC) #23
dadrian
https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc#newcode286 net/cert/internal/parse_ocsp_unittest.cc:286: base::Time verify_time = kWindowsEpoch - base::TimeDelta::FromDays(1); On 2016/07/08 02:21:02, ...
4 years, 5 months ago (2016-07-08 18:04:46 UTC) #24
dadrian
https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/160001/net/cert/internal/parse_ocsp_unittest.cc#newcode23 net/cert/internal/parse_ocsp_unittest.cc:23: base::TimeDelta::FromSeconds(INT64_C(11644473600)); On 2016/07/08 02:21:02, Ryan Sleevi (extremely slow) wrote: ...
4 years, 5 months ago (2016-07-08 22:25:42 UTC) #25
Ryan Sleevi
lgtm https://codereview.chromium.org/2091103002/diff/200001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/200001/net/cert/internal/parse_ocsp_unittest.cc#newcode21 net/cert/internal/parse_ocsp_unittest.cc:21: const base::Time kWindowsEpoch; Style guide: Class-level statics aren't ...
4 years, 5 months ago (2016-07-08 23:37:27 UTC) #26
dadrian
https://codereview.chromium.org/2091103002/diff/200001/net/cert/internal/parse_ocsp_unittest.cc File net/cert/internal/parse_ocsp_unittest.cc (right): https://codereview.chromium.org/2091103002/diff/200001/net/cert/internal/parse_ocsp_unittest.cc#newcode21 net/cert/internal/parse_ocsp_unittest.cc:21: const base::Time kWindowsEpoch; On 2016/07/08 23:37:27, Ryan Sleevi (extremely ...
4 years, 5 months ago (2016-07-09 00:13:51 UTC) #27
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/2091103002/240001
4 years, 5 months ago (2016-07-09 00:14:21 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-09 04:37:50 UTC) #32
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/2091103002/240001
4 years, 5 months ago (2016-07-11 16:30:55 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/242660)
4 years, 5 months ago (2016-07-11 17:39:54 UTC) #36
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/2091103002/240001
4 years, 5 months ago (2016-07-11 17:44:40 UTC) #38
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 5 months ago (2016-07-11 19:34:18 UTC) #39
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-11 19:34:20 UTC) #40
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/687cf9fffda1a7eb45c80a596fa4f9e3e524f0e4 Cr-Commit-Position: refs/heads/master@{#404708}
4 years, 5 months ago (2016-07-11 19:37:35 UTC) #42
engedy
4 years, 5 months ago (2016-07-12 10:01:02 UTC) #43
Message was sent while issue was closed.
A revert of this CL (patchset #13 id:240001) has been created in
https://codereview.chromium.org/2138413002/ by engedy@chromium.org.

The reason for reverting is: Causes reliable test failures on Linux Tests
(dbg)(1)(32):

EncodeValuesTest.EncodeTimeAfterTimeTMax
EncodeValuesTest.EncodeTimeFromBeforeWindows
.

Powered by Google App Engine
This is Rietveld 408576698