Support RTCConfiguration.certificates
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 21:01:15 +0000 (21:01 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 21:01:15 +0000 (21:01 +0000)
commitbd028b344706ce9f0f7a0dcaf4e63e5c8d39865a
tree69000313650088e105f7545a3f671d916f301503
parentd3bcbd7bd59da07c3664cf46a74560ac5d34e93f
Support RTCConfiguration.certificates
https://bugs.webkit.org/show_bug.cgi?id=190603

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCCertificate-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

Update RTCConfiguration to have a certificates member.
Add the conversion from RTCCertificate to libwebrtc certificates.
Add check to ensure that certificates are not expired.
Add check to ensure that certificates passed to setConfiguration were
the same as the ones passed to RTCPeerConnection constructor.
Once these checks are done, we reuse the certificates created at
RCPeerConnection creation time when setting the configuration again.

Covered by rebased WPT test.

* Modules/mediastream/RTCConfiguration.h:
* Modules/mediastream/RTCConfiguration.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::certificatesFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::configurationFromMediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.cpp:
(WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCCertificate-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCConfiguration.h
Source/WebCore/Modules/mediastream/RTCConfiguration.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.cpp
Source/WebCore/platform/mediastream/MediaEndpointConfiguration.h