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

Issue 1468273004: Provide method for returning certificate expiration timestamp. (Closed)

Created:
5 years ago by torbjorng (webrtc)
Modified:
5 years ago
Reviewers:
nisse-webrtc, hbos, tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Provide method for returning certificate expiration time stamp. We convert ASN1 time via std::tm to int64_t representing milliseconds-since-epoch. We do not use time_t since that cannot store milliseconds, and expires for 32-bit platforms in 2038 also for seconds. Conversion via std::tm might might seem silly, but actually doesn't add any complexity. One would expect tm -> seconds-since-epoch to already exist on the standard library. There is mktime, but it uses localtime (and sets an environment variable, and has the 2038 problem). The ASN1 TIME parsing is limited to what is required by RFC 5280. BUG=webrtc:5150 R=hbos@webrtc.org, nisse@webrtc.org, tommi@webrtc.org Committed: https://crrev.com/46c9cc01901ecd3af0191872f9660b710d5fe757 Cr-Commit-Position: refs/heads/master@{#10854}

Patch Set 1 #

Patch Set 2 : Misc fixes. #

Total comments: 4

Patch Set 3 : Add temporary debug logging #

Patch Set 4 : More debug printing #

Patch Set 5 : Restrict random range to avoid overflow in OpenSSL #

Patch Set 6 : Misc CL cleanups #

Total comments: 21

Patch Set 7 : Address hbos' feedback comments. #

Patch Set 8 : Remove an unused variable. #

Patch Set 9 : Move most new code from opensslidentity.cc to timeutils.cc and sslidentity.cc #

Total comments: 2

Patch Set 10 : Address hbos' feedback comments #

Total comments: 11

Patch Set 11 : Address nisse's feedback comments #

Patch Set 12 : Fix formatting #

Total comments: 19

Patch Set 13 : Adjust cut-over as per RFC 5280 #

Patch Set 14 : Address tommi's feedback #

Total comments: 1

Patch Set 15 : Add yet more testing #

Patch Set 16 : Fix type typo in last change #

Total comments: 1

Patch Set 17 : Windows fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -10 lines) Patch
M webrtc/base/fakesslidentity.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/base/opensslidentity.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/base/opensslidentity.cc View 1 2 3 4 5 6 7 8 4 chunks +22 lines, -4 lines 0 comments Download
M webrtc/base/sslidentity.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +11 lines, -2 lines 0 comments Download
M webrtc/base/sslidentity.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +71 lines, -0 lines 0 comments Download
M webrtc/base/sslidentity_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +117 lines, -0 lines 0 comments Download
M webrtc/base/sslstreamadapter_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
M webrtc/base/timeutils.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M webrtc/base/timeutils.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +44 lines, -0 lines 0 comments Download
M webrtc/base/timeutils_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +96 lines, -0 lines 0 comments Download

Messages

Total messages: 66 (28 generated)
torbjorng (webrtc)
5 years ago (2015-11-24 12:51:39 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/1
5 years ago (2015-11-24 14:00:44 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_msan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_msan/builds/6167)
5 years ago (2015-11-24 14:34:12 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/20001
5 years ago (2015-11-24 16:18:41 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_asan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/mac_asan/builds/10818)
5 years ago (2015-11-24 16:37:01 UTC) #12
hbos
First pass, happy debugging https://codereview.webrtc.org/1468273004/diff/20001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/20001/webrtc/base/opensslidentity.cc#newcode11 webrtc/base/opensslidentity.cc:11: #include <ctime> Move this to ...
5 years ago (2015-11-25 11:18:31 UTC) #13
torbjorng (webrtc)
PTAL, hbos. https://codereview.webrtc.org/1468273004/diff/20001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/20001/webrtc/base/opensslidentity.cc#newcode11 webrtc/base/opensslidentity.cc:11: #include <ctime> On 2015/11/25 11:18:31, hbos wrote: ...
5 years ago (2015-11-25 14:27:11 UTC) #14
hbos
Minor things https://codereview.webrtc.org/1468273004/diff/100001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/100001/webrtc/base/opensslidentity.cc#newcode13 webrtc/base/opensslidentity.cc:13: #include <ctime> The first include should be ...
5 years ago (2015-11-25 15:21:46 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/100001
5 years ago (2015-11-25 15:29:57 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-11-25 17:36:41 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/120001
5 years ago (2015-11-25 18:16:15 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_arm64_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios_arm64_dbg/builds/5855)
5 years ago (2015-11-25 18:18:16 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/140001
5 years ago (2015-11-25 18:26:27 UTC) #25
torbjorng (webrtc)
PTAL, juberti. If there is any chance you could take a look before the US ...
5 years ago (2015-11-25 19:14:09 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
5 years ago (2015-11-25 20:26:40 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/160001
5 years ago (2015-11-26 14:59:34 UTC) #31
hbos
https://codereview.webrtc.org/1468273004/diff/160001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (right): https://codereview.webrtc.org/1468273004/diff/160001/webrtc/base/sslidentity_unittest.cc#newcode326 webrtc/base/sslidentity_unittest.cc:326: TestExpireTime(500); If TestExpireTime(500) fails, will the effects of SetRandomTestMode(true) ...
5 years ago (2015-11-26 16:43:38 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) ...
5 years ago (2015-11-26 16:59:55 UTC) #34
hbos
lgtm if you address my SetRandomTestMode comment. Also, update the CL description to reflect the ...
5 years ago (2015-11-27 08:55:02 UTC) #35
torbjorng (webrtc)
https://codereview.webrtc.org/1468273004/diff/160001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/160001/webrtc/base/opensslidentity.cc#newcode133 webrtc/base/opensslidentity.cc:133: This change from using the undocumented X509_gmtime_adj to using ...
5 years ago (2015-11-27 10:11:25 UTC) #38
torbjorng (webrtc)
PTAL, nisse. https://codereview.webrtc.org/1468273004/diff/180001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/180001/webrtc/base/opensslidentity.cc#newcode133 webrtc/base/opensslidentity.cc:133: This change, from using the undocumented X509_gmtime_adj ...
5 years ago (2015-11-27 10:40:45 UTC) #39
nisse-webrtc
https://codereview.webrtc.org/1468273004/diff/180001/webrtc/base/sslidentity.cc File webrtc/base/sslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/180001/webrtc/base/sslidentity.cc#newcode219 webrtc/base/sslidentity.cc:219: year += 100; It would be nice to return ...
5 years ago (2015-11-27 12:47:12 UTC) #40
torbjorng (webrtc)
Thanks for feedback. The ASN1 parsing code should now be fairly tight. It relies on ...
5 years ago (2015-11-30 15:23:32 UTC) #42
tommi
lgtm https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity.cc File webrtc/base/sslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity.cc#newcode186 webrtc/base/sslidentity.cc:186: for (size_t i = 0; i < n; ...
5 years ago (2015-11-30 15:53:56 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/260001
5 years ago (2015-11-30 17:02:40 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
5 years ago (2015-11-30 19:02:58 UTC) #47
torbjorng (webrtc)
https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity.cc File webrtc/base/sslidentity.cc (right): https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity.cc#newcode186 webrtc/base/sslidentity.cc:186: for (size_t i = 0; i < n; i++) ...
5 years ago (2015-11-30 21:05:45 UTC) #48
tommi
lgtm++ https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (right): https://codereview.webrtc.org/1468273004/diff/220001/webrtc/base/sslidentity_unittest.cc#newcode398 webrtc/base/sslidentity_unittest.cc:398: SSLIdentity* identity = rtc::SSLIdentity::GenerateForTest(params); On 2015/11/30 21:05:45, torbjorng ...
5 years ago (2015-11-30 22:12:00 UTC) #49
nisse-webrtc
https://codereview.webrtc.org/1468273004/diff/260001/webrtc/base/timeutils_unittest.cc File webrtc/base/timeutils_unittest.cc (right): https://codereview.webrtc.org/1468273004/diff/260001/webrtc/base/timeutils_unittest.cc#newcode185 webrtc/base/timeutils_unittest.cc:185: // First generate something correct and check that TmToSeconds ...
5 years ago (2015-12-01 08:10:38 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/280001
5 years ago (2015-12-01 10:13:23 UTC) #52
torbjorng (webrtc)
I added the testing you suggested, but it too failed to debunk my code. PTAL ...
5 years ago (2015-12-01 10:14:20 UTC) #53
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios_dbg/builds/11124)
5 years ago (2015-12-01 10:15:23 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/300001
5 years ago (2015-12-01 10:27:34 UTC) #57
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_compile_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_compile_dbg/builds/1517)
5 years ago (2015-12-01 10:30:13 UTC) #59
nisse-webrtc
lgtm https://codereview.webrtc.org/1468273004/diff/300001/webrtc/base/timeutils_unittest.cc File webrtc/base/timeutils_unittest.cc (right): https://codereview.webrtc.org/1468273004/diff/300001/webrtc/base/timeutils_unittest.cc#newcode245 webrtc/base/timeutils_unittest.cc:245: for (int i = 0; i < times; ...
5 years ago (2015-12-01 10:39:13 UTC) #60
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468273004/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468273004/320001
5 years ago (2015-12-01 11:13:53 UTC) #62
torbjorng (webrtc)
Committed patchset #17 (id:320001) manually as 46c9cc01901ecd3af0191872f9660b710d5fe757 (presubmit successful).
5 years ago (2015-12-01 12:06:52 UTC) #65
commit-bot: I haz the power
5 years ago (2015-12-01 12:06:52 UTC) #66
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/46c9cc01901ecd3af0191872f9660b710d5fe757
Cr-Commit-Position: refs/heads/master@{#10854}

Powered by Google App Engine
This is Rietveld 408576698