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

Issue 1683193003: Implement certificate lifetime parameter as required by WebRTC RFC. (Closed)

Created:
4 years, 10 months ago by torbjorng (webrtc)
Modified:
4 years, 8 months ago
Reviewers:
tommi, hbos, Ryan Sleevi
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

Implement certificate lifetime parameter as required by WebRTC RFC. BUG=chromium:569005 Committed: https://crrev.com/e8dc081c35b5fbac58d786bee89035902c578284 Cr-Commit-Position: refs/heads/master@{#11629}

Patch Set 1 #

Patch Set 2 : Adjust test code #

Total comments: 8

Patch Set 3 : Address hbos' feedback #

Total comments: 11

Patch Set 4 : Address feedback #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -25 lines) Patch
M webrtc/base/opensslidentity.h View 1 chunk +2 lines, -1 line 4 comments Download
M webrtc/base/opensslidentity.cc View 1 2 3 2 chunks +5 lines, -9 lines 2 comments Download
M webrtc/base/sslidentity.h View 1 2 3 3 chunks +20 lines, -4 lines 6 comments Download
M webrtc/base/sslidentity.cc View 1 chunk +4 lines, -2 lines 2 comments Download
M webrtc/base/sslidentity_unittest.cc View 1 1 chunk +8 lines, -9 lines 0 comments Download

Messages

Total messages: 30 (8 generated)
torbjorng (webrtc)
4 years, 10 months ago (2016-02-11 09:23:50 UTC) #3
hbos
https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (left): https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc#oldcode400 webrtc/base/sslidentity_unittest.cc:400: SSLIdentity* identity = rtc::SSLIdentity::GenerateForTest(params); Is GenerateForTest still needed after ...
4 years, 10 months ago (2016-02-11 11:25:17 UTC) #4
torbjorng (webrtc)
https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (left): https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc#oldcode400 webrtc/base/sslidentity_unittest.cc:400: SSLIdentity* identity = rtc::SSLIdentity::GenerateForTest(params); On 2016/02/11 11:25:17, hbos wrote: ...
4 years, 10 months ago (2016-02-11 13:41:48 UTC) #5
hbos
https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (left): https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc#oldcode400 webrtc/base/sslidentity_unittest.cc:400: SSLIdentity* identity = rtc::SSLIdentity::GenerateForTest(params); On 2016/02/11 13:41:48, torbjorng (webrtc) ...
4 years, 10 months ago (2016-02-11 14:56:45 UTC) #6
torbjorng (webrtc)
PTAL, tommi. https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc File webrtc/base/sslidentity_unittest.cc (left): https://codereview.webrtc.org/1683193003/diff/20001/webrtc/base/sslidentity_unittest.cc#oldcode400 webrtc/base/sslidentity_unittest.cc:400: SSLIdentity* identity = rtc::SSLIdentity::GenerateForTest(params); On 2016/02/11 14:56:45, ...
4 years, 10 months ago (2016-02-11 15:26:00 UTC) #8
hbos
lgtm
4 years, 10 months ago (2016-02-11 15:43:27 UTC) #10
hbos
P.S. https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/sslidentity.h File webrtc/base/sslidentity.h (right): https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/sslidentity.h#newcode197 webrtc/base/sslidentity.h:197: static SSLIdentity* Generate(const std::string& common_name, Add a comment ...
4 years, 10 months ago (2016-02-11 16:37:04 UTC) #11
tommi
https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/opensslidentity.cc#newcode412 webrtc/base/opensslidentity.cc:412: time_t certificate_lifetime) { does it make sense to DCHECK ...
4 years, 10 months ago (2016-02-11 16:59:30 UTC) #12
torbjorng (webrtc)
PTAL hbos, tommi. https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1683193003/diff/40001/webrtc/base/opensslidentity.cc#newcode412 webrtc/base/opensslidentity.cc:412: time_t certificate_lifetime) { On 2016/02/11 16:59:30, ...
4 years, 10 months ago (2016-02-12 10:54:32 UTC) #13
hbos
Do you think I should rely on "expires in 0 seconds" to generate an expired ...
4 years, 10 months ago (2016-02-12 11:40:12 UTC) #14
hbos
On 2016/02/12 11:40:12, hbos wrote: > Do you think I should rely on "expires in ...
4 years, 10 months ago (2016-02-12 11:41:50 UTC) #15
torbjorng (webrtc)
Your two comments would seem to contradict each other. Either we leave the possibility of ...
4 years, 10 months ago (2016-02-12 12:58:00 UTC) #16
hbos
On 2016/02/12 12:58:00, torbjorng (webrtc) wrote: > Your two comments would seem to contradict each ...
4 years, 10 months ago (2016-02-12 13:15:59 UTC) #17
tommi
lgtm
4 years, 10 months ago (2016-02-15 16:14:13 UTC) #18
hbos
On 2016/02/15 16:14:13, tommi-webrtc wrote: > lgtm And my lgtm still hold.
4 years, 10 months ago (2016-02-15 16:20:02 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1683193003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1683193003/60001
4 years, 10 months ago (2016-02-15 16:31:36 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-15 17:35:58 UTC) #23
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/e8dc081c35b5fbac58d786bee89035902c578284 Cr-Commit-Position: refs/heads/master@{#11629}
4 years, 10 months ago (2016-02-15 17:36:06 UTC) #25
Ryan Sleevi
Drive-by after https://codereview.chromium.org/1740993002/ https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.cc#newcode419 webrtc/base/opensslidentity.cc:419: RTC_DCHECK(params.not_before < params.not_after); This is not ...
4 years, 9 months ago (2016-03-08 17:04:43 UTC) #27
torbjorng (webrtc)
https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.cc File webrtc/base/opensslidentity.cc (right): https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.cc#newcode419 webrtc/base/opensslidentity.cc:419: RTC_DCHECK(params.not_before < params.not_after); On 2016/03/08 17:04:43, Ryan Sleevi wrote: ...
4 years, 8 months ago (2016-03-30 14:00:29 UTC) #28
Ryan Sleevi
https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.h File webrtc/base/opensslidentity.h (right): https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidentity.h#newcode106 webrtc/base/opensslidentity.h:106: time_t certificate_lifetime); On 2016/03/30 14:00:29, torbjorng (webrtc) wrote: > ...
4 years, 8 months ago (2016-03-31 02:07:53 UTC) #29
torbjorng (webrtc)
4 years, 8 months ago (2016-03-31 13:18:35 UTC) #30
Message was sent while issue was closed.
Thanks for feedback, simple things addressed in
https://codereview.webrtc.org/1844313002, the rest will be addressed as per
https://bugs.chromium.org/p/webrtc/issues/detail?id=5720 .

https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidenti...
File webrtc/base/opensslidentity.h (right):

https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/opensslidenti...
webrtc/base/opensslidentity.h:106: time_t certificate_lifetime);
> OpenSSL's API is actually designed around the ASN1_TIME interface. The time_t
> bits are part of the legacy interface, and precisely because of issues with
> time_t sizing - such as the Y2038 problem. The 'right' thing to use is the
> ASN1_TIME interfaces (ASN1_TIME_DIFF, ASN1_GENERALIZEDTIME_set_string,
> ASN1_UTCTIME_set_string, etc)

Right, I wasn't aware of that one set of interfaces were considered obsolete. It
is also hard to guess which interfaces are intended as part of the external API.

I created https://bugs.chromium.org/p/webrtc/issues/detail?id=5720 about
cleaning up this.

https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/sslidentity.h
File webrtc/base/sslidentity.h (right):

https://codereview.webrtc.org/1683193003/diff/60001/webrtc/base/sslidentity.h...
webrtc/base/sslidentity.h:132: static const int kCertificateWindow = -60 * 60 *
24;
> I'm not sure what you meant, but X.509 is based on fractional microseconds.
> It's... hairy.

Really? The ANS1_TIME type used therein explicitly forbids fractional seconds.

> However, including the units in constants like this substantially improves
> readability. 

Fixing this is a separate CL.

> That seems like it would be a bug in the WebRTC code, then, perhaps setting
the
> certificate date (which is always in UTC/Z with respect to RFC 5280
> certificates) based on local time, rather than the adjustment.

I am not aware if that this would happen in WebRTC except if people have
incorrectly set system clocks. We never mess with localtime anywhere near any
certificate code...

Powered by Google App Engine
This is Rietveld 408576698