WebKit Bugzilla
Attachment 373151 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-20190628144553.patch (text/plain), 11.61 KB, created by
youenn fablet
on 2019-06-28 14:45:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-06-28 14:45:53 PDT
Size:
11.61 KB
patch
obsolete
>Subversion Revision: 246881 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index c32afdbc7caa934989cee287bb7599b85fb4f678..43689c5118b31b4415fdcf5a5e46d6b00868b194 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2019-06-28 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-06-27 Konstantin Tokarev <annulen@yandex.ru> > > Use JSC_GLIB_API_ENABLED instead of USE(GLIB) as a compile-time check for GLib JSC API >diff --git a/Source/ThirdParty/libwebrtc/ChangeLog b/Source/ThirdParty/libwebrtc/ChangeLog >index 77598fffb1832ed72e27fa9d0c2c8cac854b3e2d..1474a146d9005236e2f798d71bf3d297597133f2 100644 >--- a/Source/ThirdParty/libwebrtc/ChangeLog >+++ b/Source/ThirdParty/libwebrtc/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-28 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-25 Youenn Fablet <youenn@apple.com> > > Close sockets with too high file descriptor >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 47baea2c6d93f1c67d7fd8497e2d823f1c1a9acd..982d364db9fcf694502dc3e4bd0a59fe96706f96 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-28 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-06-27 Devin Rousso <drousso@apple.com> > > Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString >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..3ea7d9d4968f3dde38cda1e88754b86b85d300ca 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> >@@ -88,7 +89,9 @@ RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext& context) > #endif > , m_backend(PeerConnectionBackend::create(*this)) > { >- ALWAYS_LOG(LOGIDENTIFIER); >+ auto& page = *downcast<Document>(context).page(); >+ ALWAYS_LOG(LOGIDENTIFIER, "encryption = ", page.settings().webRTCEncryptionEnabled()); >+ > 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 cbc73a110fbd56491c3acfc4782a0e202a37bfc6..73398857889d37b7ce6e6c2151b591a5e846d0b9 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -843,6 +843,10 @@ shouldDispatchSyntheticMouseEventsWhenModifyingSelection: > 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 29c1ebdb9abe7509fb5346ca2040964d8c2fa589..7dd633de6c5581105b99d8608f8c2e35fecdc131 100644 >--- a/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >+++ b/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js >@@ -332,6 +332,7 @@ localizedStrings["Diagnoses common accessibility problems affecting screen reade > localizedStrings["Dimensions"] = "Dimensions"; > localizedStrings["Disable Breakpoint"] = "Disable Breakpoint"; > localizedStrings["Disable Breakpoints"] = "Disable 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 5bfde51548f7f26a7baed1b9a447e8d52cb6657c..1f86d979114637bd8dbe5cade8d32557f088e1c3 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Main.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Main.js >@@ -2264,6 +2264,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