RTCPeerConnection.generateCertificate is not a function
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 20:52:15 +0000 (20:52 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Oct 2018 20:52:15 +0000 (20:52 +0000)
commit2e11f62138463c4efb0a1fe58ab289014ffe2d15
tree6239cee65050a3820da69d514bff2eaf05fadc37
parent7c536366e9139a506858b1a2b06b3105050bb1b5
RTCPeerConnection.generateCertificate is not a function
https://bugs.webkit.org/show_bug.cgi?id=173541
<rdar://problem/32638029>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCCertificate-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-generateCertificate-expected.txt:
* web-platform-tests/webrtc/interfaces.https-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:

Add support for RTCCertificate generation through libwebrtc certificate generator.
Make generation in the webrtc network thread.
Support is as per spec (ECDSA and RSASSA_PKCS).

Partially covered by WPT tests.

* css/StyleBuilder.h: Fixing build.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/webauthn/PublicKeyCredential.cpp: Fixing build.
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::generateCertificate):
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::CertificateInformation::RSASSA_PKCS1_v1_5):
(WebCore::PeerConnectionBackend::CertificateInformation::ECDSA_P256):
(WebCore::PeerConnectionBackend::CertificateInformation::CertificateInformation):
* Modules/mediastream/RTCCertificate.cpp: Added.
(WebCore::RTCCertificate::create):
(WebCore::RTCCertificate::RTCCertificate):
* Modules/mediastream/RTCCertificate.h: Added.
(WebCore::RTCCertificate::expires const):
(WebCore::RTCCertificate::getFingerprints const):
* Modules/mediastream/RTCCertificate.idl: Added.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::certificateTypeFromAlgorithmIdentifier):
(WebCore::RTCPeerConnection::generateCertificate):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp: Added.
(WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::RTCCertificateGeneratorCallback):
(WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::~RTCCertificateGeneratorCallback):
(WebCore::LibWebRTCCertificateGenerator::keyParamsFromCertificateType):
(WebCore::LibWebRTCCertificateGenerator::generateCertificate):
* Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h: Added.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::certificateGenerator):
* platform/mediastream/libwebrtc/LibWebRTCProvider.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
LayoutTests/http/wpt/webrtc/generateCertificate-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/webrtc/generateCertificate.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCCertificate-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-generateCertificate-expected.txt
LayoutTests/imported/w3c/web-platform-tests/webrtc/interfaces.https-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/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/PeerConnectionBackend.h
Source/WebCore/Modules/mediastream/RTCCertificate.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCCertificate.h [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCCertificate.idl [new file with mode: 0644]
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCPeerConnection.h
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp [new file with mode: 0644]
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h [new file with mode: 0644]
Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WebCoreBuiltinNames.h
Source/WebCore/css/StyleBuilder.h
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h