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

Issue 1494103003: RTCCertificate::Expires() and ::HasExpired() implemented (Closed)

Created:
5 years ago by hbos
Modified:
5 years ago
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

RTCCertificate::Expires() and ::HasExpired() implemented using SSLCertificate::CertificateExpirationTime(). NOPRESUBMIT=true BUG=chromium:544894 Committed: https://crrev.com/20ef654174e245b3a06c9e9045bb97be9acd90cf Cr-Commit-Position: refs/heads/master@{#10930}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed comments, added unittest #

Total comments: 11

Patch Set 3 : Test w FakeSSLCertificate w expires setter. HasExpired tested with expires 10s from now #

Total comments: 3

Patch Set 4 : Injecting time @ HasExpired. Unittests /w seconds. SSLCertificate instead of FakeSSLCertificate. #

Total comments: 8

Patch Set 5 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -12 lines) Patch
M webrtc/base/base_tests.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/base/fakesslidentity.h View 1 2 3 4 3 chunks +12 lines, -3 lines 0 comments Download
M webrtc/base/rtccertificate.h View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/rtccertificate.cc View 1 2 3 4 2 chunks +8 lines, -6 lines 0 comments Download
A webrtc/base/rtccertificate_unittests.cc View 1 2 3 4 1 chunk +116 lines, -0 lines 0 comments Download
M webrtc/base/sslidentity.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 52 (19 generated)
hbos
Please take a look torbjorng and hta.
5 years ago (2015-12-03 11:38:36 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/1494103003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494103003/1
5 years ago (2015-12-03 11:38:46 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-03 12:42:24 UTC) #7
torbjorng (webrtc)
https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.cc File webrtc/base/rtccertificate.cc (right): https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.cc#newcode34 webrtc/base/rtccertificate.cc:34: return static_cast<uint64_t>(expires * 1000); // s -> ms nit: ...
5 years ago (2015-12-03 13:05:18 UTC) #8
hta-webrtc
Looks good (modulo tests and other comments). https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.h File webrtc/base/rtccertificate.h (right): https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.h#newcode32 webrtc/base/rtccertificate.h:32: bool HasExpired() ...
5 years ago (2015-12-03 13:49:07 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494103003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494103003/20001
5 years ago (2015-12-03 15:56:33 UTC) #11
hbos
PTAL torbjorng https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.cc File webrtc/base/rtccertificate.cc (right): https://codereview.webrtc.org/1494103003/diff/1/webrtc/base/rtccertificate.cc#newcode34 webrtc/base/rtccertificate.cc:34: return static_cast<uint64_t>(expires * 1000); // s -> ...
5 years ago (2015-12-03 16:03:48 UTC) #12
hbos
And PTAL hta also :) if it's confusing that I'm using ms units but seconds-precision ...
5 years ago (2015-12-03 16:19:29 UTC) #13
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-12-03 17:56:39 UTC) #15
hta-webrtc
Not happy with the tests - waiting and looping in a test is a sign ...
5 years ago (2015-12-03 18:16:05 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494103003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494103003/40001
5 years ago (2015-12-04 09:53:14 UTC) #18
hbos
PTAL. Using FakeSSLCertificate I can set the expires time directly. Are you happy with this? ...
5 years ago (2015-12-04 09:58:56 UTC) #19
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/6412)
5 years ago (2015-12-04 10:45:26 UTC) #21
hta-webrtc
lgtm https://codereview.webrtc.org/1494103003/diff/40001/webrtc/base/rtccertificate_unittests.cc File webrtc/base/rtccertificate_unittests.cc (right): https://codereview.webrtc.org/1494103003/diff/40001/webrtc/base/rtccertificate_unittests.cc#newcode70 webrtc/base/rtccertificate_unittests.cc:70: uint64_t now = Now() + 10 * 1000; ...
5 years ago (2015-12-04 11:27:39 UTC) #22
hbos
PTAL torbjorng
5 years ago (2015-12-04 11:28:46 UTC) #23
torbjorng (webrtc)
I'm afraid I disagree with hta and the latest test edits. I explain it carefully ...
5 years ago (2015-12-04 12:47:46 UTC) #24
hta-webrtc
I'm afraid I disagree strongly with Torbjörn here. Unit tests should be small tests. A ...
5 years ago (2015-12-04 13:32:44 UTC) #25
torbjorng (webrtc)
If we leave out the definition of unittest, do we all agree that we should ...
5 years ago (2015-12-04 13:47:32 UTC) #26
hbos
Torbjörn you're right in that testing a cert going from non-expired to expired is a ...
5 years ago (2015-12-04 14:14:38 UTC) #27
hbos
So how about we make "now" a parameter of RTCCertificate::HasExpired and inject it in the ...
5 years ago (2015-12-07 11:04:18 UTC) #28
torbjorng (webrtc)
Your proposal sounds good; we will be back to a vertically checked expiration chain. https://codereview.webrtc.org/1494103003/diff/40001/webrtc/base/rtccertificate.cc ...
5 years ago (2015-12-07 12:43:19 UTC) #29
hbos
PTAL torbjorng and hta. Trying to make both happy. I'm back to using SSLIdentity/SSLCertificate instead ...
5 years ago (2015-12-07 14:20:50 UTC) #33
torbjorng (webrtc)
lgtm Some minor comments only. https://codereview.webrtc.org/1494103003/diff/120001/webrtc/base/fakesslidentity.h File webrtc/base/fakesslidentity.h (right): https://codereview.webrtc.org/1494103003/diff/120001/webrtc/base/fakesslidentity.h#newcode89 webrtc/base/fakesslidentity.h:89: int64_t expiration_time_; nit: Please ...
5 years ago (2015-12-07 14:53:26 UTC) #34
hta-webrtc
lgtm Now I'm happy!
5 years ago (2015-12-07 14:54:08 UTC) #35
hbos
https://codereview.webrtc.org/1494103003/diff/120001/webrtc/base/fakesslidentity.h File webrtc/base/fakesslidentity.h (right): https://codereview.webrtc.org/1494103003/diff/120001/webrtc/base/fakesslidentity.h#newcode89 webrtc/base/fakesslidentity.h:89: int64_t expiration_time_; On 2015/12/07 14:53:26, torbjorng (webrtc) wrote: > ...
5 years ago (2015-12-07 15:59:36 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494103003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494103003/140001
5 years ago (2015-12-07 15:59:48 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/2243)
5 years ago (2015-12-07 16:11:05 UTC) #41
hbos
+kjellander I'm getting the following presubmit message: As you're changing GYP files: please make sure ...
5 years ago (2015-12-07 16:59:52 UTC) #43
kjellander_webrtc
On 2015/12/07 16:59:52, hbos wrote: > +kjellander > > I'm getting the following presubmit message: ...
5 years ago (2015-12-07 17:08:00 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494103003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494103003/140001
5 years ago (2015-12-08 09:36:38 UTC) #47
commit-bot: I haz the power
Committed patchset #5 (id:140001)
5 years ago (2015-12-08 09:42:42 UTC) #49
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/20ef654174e245b3a06c9e9045bb97be9acd90cf Cr-Commit-Position: refs/heads/master@{#10930}
5 years ago (2015-12-08 09:42:55 UTC) #51
hbos
5 years ago (2015-12-08 10:31:28 UTC) #52
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:140001) has been created in
https://codereview.webrtc.org/1506883005/ by hbos@webrtc.org.

The reason for reverting is: RTCCertificate's expires_timestamp_ns was renamed
to Expires but the old function is still used in one place in Chromium...
https://uberchromegw.corp.google.com/i/chromium.webrtc.fyi/builders/Mac%20Bui....

Powered by Google App Engine
This is Rietveld 408576698