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

Issue 1373023002: RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (Closed)

Created:
5 years, 2 months ago by hbos_chromium
Modified:
5 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (This is a re-upload of https://codereview.chromium.org/1311853005/ after blink merged with chrome.) Primary changes: New Blink JavaScript (idl) - blink::RTCCertificate added. - RTCPeerConnection.generateCertificate added. - RTCPeerConnection::parseConfiguration, used to parse RTCConfiguration dictionaries, updated to support optional sequence<RTCCertificate> certificates member. Blink layer interfaces added (abstraction level between blink and chromium-using-webrtc) - blink::WebRTCCertificate, the heart of a javascript blink::RTCCertificate. - blink::WebRTCCertificateGenerator, something that generates a blink::WebRTCCertificate. Chromium implementations - content::RTCCertificate (impl blink::WebRTCCertificate), basically a wrapper/container for the WebRTC layer certificate rtc::RTCCertificate. - content::RTCCertificateGenerator (impl blink::WebRTCCertificateGenerator), creates content::RTCCertificate. It generates the rtc::RTCCertificate using the already existing PeerConnectionIdentityStore. Other changes: - Platform gets createRTCCertificateGenerator(), RendererBlinkPlatformImpl implements it to create a new content::RTCCertificateGenerator. Briges blink with chromium implementation. - blink::WebRTCCertificate added to blink::RTCConfiguration. When converted to WebRTC layer configuration the certificates are retreived, meaning the peerconnection will end up with the certificates as input. - PeerConnectionIdentityStore calling WebRTC code (SSLIdentity::Generate) when request is made to generate non-RSA certificates. Previously only RSA was supported and non-RSA would DCHECK crash. blink-dev@ intent to implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3Pps95Q6zRQ BUG=528250, webrtc:4927 Committed: https://crrev.com/ef4ab6012fddc80992b8848cfc6700e731dc39b1 Cr-Commit-Position: refs/heads/master@{#355520}

Patch Set 1 #

Total comments: 20

Patch Set 2 : Addressed comments. Added JavaScript unittests. #

Patch Set 3 : WebRTCKeyType -> WebRTCKeyParams to closely match the about-to-land rtc::KeyParams #

Patch Set 4 : Rebase with master #

Patch Set 5 : Make trybots compile (WebRTCCertificate not including wtf/Noncopyable) #

Total comments: 68

Patch Set 6 : Addressed comments #

Patch Set 7 : Rebase with master #

Patch Set 8 : Resolve WebRTCKeyParams->KeyParams TODOs #

Total comments: 12

Patch Set 9 : Rebase with master #

Patch Set 10 : Addressed nits + Pass webkit_tests (updated global-interface-listing-expected.txt) #

Total comments: 20

Patch Set 11 : Addressed jochen's comments #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+767 lines, -138 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/media/peer_connection_identity_store.cc View 1 2 3 4 5 6 7 8 9 4 chunks +56 lines, -9 lines 0 comments Download
A content/renderer/media/rtc_certificate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +41 lines, -0 lines 0 comments Download
A content/renderer/media/rtc_certificate.cc View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A content/renderer/media/rtc_certificate_generator.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +37 lines, -0 lines 0 comments Download
A content/renderer/media/rtc_certificate_generator.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +120 lines, -0 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -1 line 0 comments Download
M content/renderer/renderer_blink_platform_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html View 1 2 3 4 5 1 chunk +41 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt View 1 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-generateCertificate.html View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-generateCertificate-expected.txt View 1 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/mediastream/RTCCertificate.h View 1 2 3 4 5 2 chunks +21 lines, -23 lines 0 comments Download
A + third_party/WebKit/Source/modules/mediastream/RTCCertificate.cpp View 1 2 3 4 5 6 2 chunks +17 lines, -14 lines 0 comments Download
A + third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +122 lines, -0 lines 7 comments Download
M third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebRTCConfiguration.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/mediastream/RTCConfiguration.h View 5 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
A third_party/WebKit/public/platform/WebRTCCertificate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
A + third_party/WebKit/public/platform/WebRTCCertificateGenerator.h View 1 2 3 4 5 6 7 8 2 chunks +23 lines, -27 lines 0 comments Download
M third_party/WebKit/public/platform/WebRTCConfiguration.h View 2 chunks +4 lines, -0 lines 0 comments Download
A + third_party/WebKit/public/platform/WebRTCKeyParams.h View 1 2 2 chunks +40 lines, -52 lines 2 comments Download

Messages

Total messages: 38 (11 generated)
hbos_chromium
PTAL jochen, guidou. This is a re-upload of https://codereview.chromium.org/1311853005/ due to blink + chromium repository ...
5 years, 2 months ago (2015-09-28 15:46:02 UTC) #2
jochen (gone - plz use gerrit)
some comments. can you add tests please? https://codereview.chromium.org/1373023002/diff/1/content/renderer/media/peer_connection_identity_store.cc File content/renderer/media/peer_connection_identity_store.cc (right): https://codereview.chromium.org/1373023002/diff/1/content/renderer/media/peer_connection_identity_store.cc#newcode78 content/renderer/media/peer_connection_identity_store.cc:78: void CallObserverOnSuccess( ...
5 years, 2 months ago (2015-09-29 07:47:10 UTC) #4
hbos_chromium
Sorry for not rebasing before leaving office (patch failure). Time zone diffs etc. Addressed comments ...
5 years, 2 months ago (2015-10-02 15:43:18 UTC) #5
jochen (gone - plz use gerrit)
lgtm
5 years, 2 months ago (2015-10-05 15:34:53 UTC) #6
jochen (gone - plz use gerrit)
On 2015/10/05 at 15:34:53, jochen wrote: > lgtm oops, ignore that, sorry
5 years, 2 months ago (2015-10-05 15:39:00 UTC) #7
jochen (gone - plz use gerrit)
+philipj who knows more about media than me sorry for being so slow with comments ...
5 years, 2 months ago (2015-10-05 15:39:55 UTC) #9
philipj_slow
hbos@, which bits would you like me to review? For modules/mediastream you have tommi@ right ...
5 years, 2 months ago (2015-10-05 16:30:48 UTC) #10
hbos_chromium
PTAL guidou, jochen. jochen/philipj: With guidou giving a second opinion, do you want philipj to ...
5 years, 2 months ago (2015-10-06 15:56:35 UTC) #12
philipj_slow
I've taken a closer look at the IDL files, as that's kind of my thing. ...
5 years, 2 months ago (2015-10-08 08:32:31 UTC) #13
Guido Urdaneta
https://codereview.chromium.org/1373023002/diff/1/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp File third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp (right): https://codereview.chromium.org/1373023002/diff/1/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp#newcode96 third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp:96: // which is ensured to invoke one of these. ...
5 years, 2 months ago (2015-10-08 11:13:03 UTC) #14
Ryan Sleevi
Eric's a far better reviewer for this.
5 years, 2 months ago (2015-10-10 03:37:00 UTC) #16
Ryan Sleevi
I'd say my biggest remark is to take a second pass through the comments/documentation. There's ...
5 years, 2 months ago (2015-10-10 04:04:48 UTC) #17
hbos_chromium
PTAL everyone. I want this and follow-up CLs if possible to land before 48 feature ...
5 years, 2 months ago (2015-10-14 13:00:50 UTC) #19
torbjorng
https://codereview.chromium.org/1373023002/diff/100001/content/renderer/media/rtc_certificate_generator.cc File content/renderer/media/rtc_certificate_generator.cc (right): https://codereview.chromium.org/1373023002/diff/100001/content/renderer/media/rtc_certificate_generator.cc#newcode51 content/renderer/media/rtc_certificate_generator.cc:51: der_private_key.length()); On 2015/10/10 04:04:48, Ryan Sleevi (busy till 10-12) ...
5 years, 2 months ago (2015-10-14 13:02:48 UTC) #21
philipj_slow
The IDL files now LGTM. https://codereview.chromium.org/1373023002/diff/100001/third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl File third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl (right): https://codereview.chromium.org/1373023002/diff/100001/third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl#newcode38 third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl:38: readonly attribute Date expires; ...
5 years, 2 months ago (2015-10-16 13:32:32 UTC) #22
hbos_chromium
Bump jochen, guidou
5 years, 2 months ago (2015-10-19 09:38:35 UTC) #23
Guido Urdaneta
lgtm % nits https://codereview.chromium.org/1373023002/diff/180001/content/renderer/media/peer_connection_identity_store.cc File content/renderer/media/peer_connection_identity_store.cc (right): https://codereview.chromium.org/1373023002/diff/180001/content/renderer/media/peer_connection_identity_store.cc#newcode83 content/renderer/media/peer_connection_identity_store.cc:83: } micro-nit: put blank line before ...
5 years, 2 months ago (2015-10-19 10:41:17 UTC) #24
hbos_chromium
Addressed nits. Bump jochen ;) https://codereview.chromium.org/1373023002/diff/100001/third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl File third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl (right): https://codereview.chromium.org/1373023002/diff/100001/third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl#newcode38 third_party/WebKit/Source/modules/mediastream/RTCCertificate.idl:38: readonly attribute Date expires; ...
5 years, 2 months ago (2015-10-19 15:21:35 UTC) #25
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1373023002/diff/220001/content/renderer/media/peer_connection_identity_store.cc File content/renderer/media/peer_connection_identity_store.cc (right): https://codereview.chromium.org/1373023002/diff/220001/content/renderer/media/peer_connection_identity_store.cc#newcode138 content/renderer/media/peer_connection_identity_store.cc:138: base::Bind(&ObserverOnSuccess, observer, base::Passed(&identity))); why not just base::Bind(&webrtc::DtlsIdentityRequestObserver::OnSuccess, observer, base::Passed(&identityt)) ...
5 years, 2 months ago (2015-10-20 12:27:35 UTC) #26
hbos_chromium
Thanks for the reviews! Addressed jochen's comments. Sorry for the size of the CL. Ryan, ...
5 years, 2 months ago (2015-10-20 15:42:24 UTC) #28
jochen (gone - plz use gerrit)
lgtm once eroman approves
5 years, 2 months ago (2015-10-21 13:40:23 UTC) #30
eroman
LGTM assuming there is follow-up to switching the AlgorithmIdentifier parsing over to blink::normalizeAlgorithm(). https://codereview.chromium.org/1373023002/diff/240001/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp File ...
5 years, 2 months ago (2015-10-21 22:55:51 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373023002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373023002/240001
5 years, 2 months ago (2015-10-22 08:43:51 UTC) #34
hbos_chromium
Thanks everyone! (Sorry for not splitting the CL up into more easily reviewable pieces.) https://codereview.chromium.org/1373023002/diff/240001/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp ...
5 years, 2 months ago (2015-10-22 09:40:57 UTC) #35
commit-bot: I haz the power
Committed patchset #11 (id:240001)
5 years, 2 months ago (2015-10-22 10:26:29 UTC) #36
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/ef4ab6012fddc80992b8848cfc6700e731dc39b1 Cr-Commit-Position: refs/heads/master@{#355520}
5 years, 2 months ago (2015-10-22 10:27:50 UTC) #37
eroman
5 years, 2 months ago (2015-10-22 17:49:49 UTC) #38
Message was sent while issue was closed.
https://codereview.chromium.org/1373023002/diff/240001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
(right):

https://codereview.chromium.org/1373023002/diff/240001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp:483: if
(DictionaryHelper::get(keygenAlgorithm, "name", name)) {
On 2015/10/22 09:40:56, hbos_chromium wrote:
> On 2015/10/21 22:55:50, eroman wrote:
> > As-written the AlgorithmIdentifier parsing code here has two main problems:
> > 
> >   (1) publicExponent must be a BigInteger and not a Number
> > (https://github.com/w3c/webrtc-pc/issues/310)
> >   (2) Algorithm names must be case-insensitive (so for instance EcDsA should
> > also be recognized)
> > 
> > If your intention is to submit this changelist as-is as a temporary measure,
> and
> > then follow-up quickly with a switchover to calling WebCrypto's parsing
> > algorithm (which should actually involve less code for more features), that
is
> > fine -- I am happy to review that as a separate CL.
> 
> That's what I'll do :) Btw there is a third problem. WebCrypto requires RSA to
> have a "hash" value too: https://github.com/w3c/webrtc-pc/issues/322.

Oh right, that too ... Yuck!

Powered by Google App Engine
This is Rietveld 408576698