WebKit Bugzilla
Attachment 373602 Details for
Bug 199177
: Enable a debug WebRTC mode without any encryption
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199177-20190707135447.patch (text/plain), 11.63 KB, created by
youenn fablet
on 2019-07-07 13:54:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-07-07 13:54:48 PDT
Size:
11.63 KB
patch
obsolete
>Subversion Revision: 247200 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index cebfd627debd4a8d93a786617c89a0550b514696..c7705c03a61dc7f856d52bfa684d90ba94ef7863 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2019-07-06 Youenn Fablet <youenn@apple.com> >+ >+ Enable a debug WebRTC mode without any encryption >+ https://bugs.webkit.org/show_bug.cgi?id=199177 >+ <rdar://problem/52074986> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/protocol/Page.json: >+ > 2019-07-06 Michael Saboff <msaboff@apple.com> > > switch(String) needs to check for exceptions when resolving the string >diff --git a/Source/ThirdParty/libwebrtc/ChangeLog b/Source/ThirdParty/libwebrtc/ChangeLog >index 18a01aa5a7bed2e0efcecd1920852c85bd86b86e..b6237bc615d4f1372504598c672b2ca1b55fdc0c 100644 >--- a/Source/ThirdParty/libwebrtc/ChangeLog >+++ b/Source/ThirdParty/libwebrtc/ChangeLog >@@ -1,3 +1,15 @@ >+2019-07-06 Youenn Fablet <youenn@apple.com> >+ >+ Enable a debug WebRTC mode without any encryption >+ https://bugs.webkit.org/show_bug.cgi?id=199177 >+ <rdar://problem/52074986> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/libwebrtc.iOS.exp: >+ * Configurations/libwebrtc.iOSsim.exp: >+ * Configurations/libwebrtc.mac.exp: >+ > 2019-06-28 Dean Jackson <dino@apple.com> > > unable to build WebRTC for iOS Simulator >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 1df39540308c474a657fd4d918c8968189b1f1c8..2e372795282126dca6649995719f36b23ada1050 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,14 @@ >+2019-07-06 Youenn Fablet <youenn@apple.com> >+ >+ Enable a debug WebRTC mode without any encryption >+ https://bugs.webkit.org/show_bug.cgi?id=199177 >+ <rdar://problem/52074986> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Localizations/en.lproj/localizedStrings.js: >+ * UserInterface/Base/Main.js: >+ > 2019-07-06 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values >diff --git a/Source/JavaScriptCore/inspector/protocol/Page.json b/Source/JavaScriptCore/inspector/protocol/Page.json >index 769bf4b3b8f98e6c4ed39f5506955727e72f0815..8c64cfc3033ac8f0f49085c019fb260c7376dab4 100644 >--- a/Source/JavaScriptCore/inspector/protocol/Page.json >+++ b/Source/JavaScriptCore/inspector/protocol/Page.json >@@ -15,6 +15,7 @@ > "MockCaptureDevicesEnabled", > "NeedsSiteSpecificQuirks", > "ScriptEnabled", >+ "WebRTCEncryptionEnabled", > "WebSecurityEnabled" > ] > }, >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >index 2b06ca8fa0fd5baf25694038f3680ac137fb9465..646d8d4cbde0e62fbe27cf9a486b34314c3a7521 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp >@@ -247,3 +247,4 @@ __ZN6webrtc16RtpFecParametersD1Ev > __ZN6webrtc16RtpRtxParametersC1ERKS0_ > __ZN6webrtc16RtpRtxParametersD1Ev > __ZN3rtc10LogMessage12SetLogOutputENS_15LoggingSeverityEPFvS1_PKcE >+__ZN6webrtc13CryptoOptions5NoGcmEv >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >index 6c366cf73720a8355f4792de64ba1aa1a0275504..980c3f495139e9d86d03a5ec06cf98a89c274073 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp >@@ -248,3 +248,4 @@ __ZN6webrtc16RtpFecParametersD1Ev > __ZN6webrtc16RtpRtxParametersC1ERKS0_ > __ZN6webrtc16RtpRtxParametersD1Ev > __ZN3rtc10LogMessage12SetLogOutputENS_15LoggingSeverityEPFvS1_PKcE >+__ZN6webrtc13CryptoOptions5NoGcmEv >diff --git a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >index 6c366cf73720a8355f4792de64ba1aa1a0275504..980c3f495139e9d86d03a5ec06cf98a89c274073 100644 >--- a/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >+++ b/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp >@@ -248,3 +248,4 @@ __ZN6webrtc16RtpFecParametersD1Ev > __ZN6webrtc16RtpRtxParametersC1ERKS0_ > __ZN6webrtc16RtpRtxParametersD1Ev > __ZN3rtc10LogMessage12SetLogOutputENS_15LoggingSeverityEPFvS1_PKcE >+__ZN6webrtc13CryptoOptions5NoGcmEv >diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp >index 8713fdded1711cb80b8b22fe78cd4fec10dde7a6..af14c6a896362c72c1f05e7d749565e934abcc90 100644 >--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp >+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp >@@ -52,6 +52,7 @@ > #include "RTCIceCandidate.h" > #include "RTCPeerConnectionIceEvent.h" > #include "RTCSessionDescription.h" >+#include "Settings.h" > #include <wtf/CryptographicallyRandomNumber.h> > #include <wtf/IsoMallocInlines.h> > #include <wtf/MainThread.h> >@@ -89,6 +90,13 @@ RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context) > , m_backend(PeerConnectionBackend::create(*this)) > { > ALWAYS_LOG(LOGIDENTIFIER); >+ >+#if !RELEASE_LOG_DISABLED >+ auto* page = downcast<Document>(context).page(); >+ if (page && page->settings().webRTCEncryptionEnabled()) >+ ALWAYS_LOG(LOGIDENTIFIER, "encryption is disabled"); >+#endif >+ > if (!m_backend) > m_connectionState = RTCPeerConnectionState::Closed; > } >diff --git a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >index 851fddead4ce95b5a70e015be9c44a06cb7dc774..207f15e6457b9dfcac1c339ea39fea1d77859d8b 100644 >--- a/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >+++ b/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp >@@ -46,6 +46,7 @@ > #include "RealtimeOutgoingAudioSource.h" > #include "RealtimeOutgoingVideoSource.h" > #include "RuntimeEnabledFeatures.h" >+#include "Settings.h" > > namespace WebCore { > >@@ -58,6 +59,8 @@ static std::unique_ptr<PeerConnectionBackend> createLibWebRTCPeerConnectionBacke > if (!page) > return nullptr; > >+ page->libWebRTCProvider().setEnableWebRTCEncryption(page->settings().webRTCEncryptionEnabled()); >+ > return std::make_unique<LibWebRTCPeerConnectionBackend>(peerConnection, page->libWebRTCProvider()); > } > >diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >index c6762e6386e01a495d5493e73bb88dd487d3cd75..a0f4ad81ee2a8177f03ed9f8ae6cdce67159a788 100644 >--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp >@@ -93,6 +93,7 @@ using namespace Inspector; > macro(MockCaptureDevicesEnabled) \ > macro(NeedsSiteSpecificQuirks) \ > macro(ScriptEnabled) \ >+ macro(WebRTCEncryptionEnabled) \ > macro(WebSecurityEnabled) > > static bool decodeBuffer(const char* buffer, unsigned size, const String& textEncodingName, String* result) >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index e22d8d4e29023e82a0ca047c1d6f55e84d42d8a3..e628bea254a9e2809f407b30023311e36a0a5980 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -846,6 +846,10 @@ shouldDispatchSyntheticMouseOutAfterSyntheticClick: > allowViewportShrinkToFitContent: > initial: true > >+webRTCEncryptionEnabled: >+ initial: true >+ inspectorOverride: true >+ > # Deprecated > > iceCandidateFilteringEnabled: >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >index ffe50e663a3cea9c56373325a8a5f66a935e28ae..3aa90cfa46a7ec00e756da3fbecd52a643c72ece 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp >@@ -297,6 +297,17 @@ rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPee > return createPeerConnection(observer, *factoryAndThreads.networkManager, *factoryAndThreads.packetSocketFactory, WTFMove(configuration), nullptr); > } > >+void LibWebRTCProvider::setEnableWebRTCEncryption(bool enableWebRTCEncryption) >+{ >+ auto* factory = this->factory(); >+ if (!factory) >+ return; >+ >+ webrtc::PeerConnectionFactoryInterface::Options options; >+ options.disable_encryption = !enableWebRTCEncryption; >+ m_factory->SetOptions(options); >+} >+ > rtc::scoped_refptr<webrtc::PeerConnectionInterface> LibWebRTCProvider::createPeerConnection(webrtc::PeerConnectionObserver& observer, rtc::NetworkManager& networkManager, rtc::PacketSocketFactory& packetSocketFactory, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration, std::unique_ptr<webrtc::AsyncResolverFactory>&& asyncResolveFactory) > { > auto& factoryAndThreads = getStaticFactoryAndThreads(m_useNetworkThreadWithSocketServer); >diff --git a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >index 1a184310719c84189d41443bab2f099297f18917..248572f36cf16722d548552c8e5ef1e3b4328e88 100644 >--- a/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >+++ b/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h >@@ -116,6 +116,7 @@ public: > void clearFactory() { m_factory = nullptr; } > > void setEnableLogging(bool); >+ void setEnableWebRTCEncryption(bool); > > protected: > LibWebRTCProvider() = default; >diff --git a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >index 224d44958befdad9b49f675c90ba624d3a9b7331..52ce95b1d12c83c7233769c017c140b84d10d52a 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -335,6 +335,7 @@ localizedStrings["Dimensions"] = "Dimensions"; > localizedStrings["Disable Breakpoint"] = "Disable Breakpoint"; > localizedStrings["Disable Breakpoints"] = "Disable Breakpoints"; > localizedStrings["Disable Descendant Breakpoints"] = "Disable Descendant Breakpoints"; >+localizedStrings["Disable Encryption"] = "Disable Encryption"; > localizedStrings["Disable Event Listener"] = "Disable Event Listener"; > localizedStrings["Disable ICE Candidate Restrictions"] = "Disable ICE Candidate Restrictions"; > localizedStrings["Disable Program"] = "Disable Program"; >diff --git a/Source/WebInspectorUI/UserInterface/Base/Main.js b/Source/WebInspectorUI/UserInterface/Base/Main.js >index e9e6acdcaee26b486eda0a8bdb3bded2aece6053..de940ec61325e2451a5b7c174af1ef8078f84f5c 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Main.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Main.js >@@ -2265,6 +2265,7 @@ WI._handleDeviceSettingsToolbarButtonClicked = function(event) > {name: WI.UIString("Allow Media Capture on Insecure Sites"), setting: PageAgent.Setting.MediaCaptureRequiresSecureConnection, value: false}, > {name: WI.UIString("Disable ICE Candidate Restrictions"), setting: PageAgent.Setting.ICECandidateFilteringEnabled, value: false}, > {name: WI.UIString("Use Mock Capture Devices"), setting: PageAgent.Setting.MockCaptureDevicesEnabled, value: true}, >+ {name: WI.UIString("Disable Encryption"), setting: PageAgent.Setting.WebRTCEncryptionEnabled, value: false}, > ], > ], > },
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199177
:
373151
|
373159
|
373165
|
373602
|
373642