Diff
Modified: trunk/LayoutTests/ChangeLog (239697 => 239698)
--- trunk/LayoutTests/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,24 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ * http/tests/inspector/network/resource-security-connection-expected.txt: Added.
+ * http/tests/inspector/network/resource-security-connection.html: Added.
+
+ * http/tests/inspector/network/resource-security-certificate-expected.txt: Added.
+ * http/tests/inspector/network/resource-security-certificate.html: Added.
+ * http/tests/inspector/network/resource-response-security-expected.txt: Deleted.
+ * http/tests/inspector/network/resource-response-security.html: Deleted.
+
+ * platform/gtk/TestExpectations:
+ * platform/mac/TestExpectations:
+ * platform/wincairo/TestExpectations:
+ * platform/wpe/TestExpectations:
+
2019-01-07 Truitt Savell <[email protected]>
Update test expectations for platform/mac/media/audio-session-category-video-paused.html
Deleted: trunk/LayoutTests/http/tests/inspector/network/resource-response-security-expected.txt (239697 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-response-security-expected.txt 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-response-security-expected.txt 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,12 +0,0 @@
-Tests that a resource has security information.
-
-
-== Running test suite: Resource.Security
--- Running test case: Resource.Security.Certificate
-PASS: Resource should have been loaded securely.
-PASS: Resource should have security information.
-PASS: Security information should include certificate information.
-PASS: Certificate should have subject
-PASS: Certificate should have a validFrom date.
-PASS: Certificate should have a validUntil date.
-
Deleted: trunk/LayoutTests/http/tests/inspector/network/resource-response-security.html (239697 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-response-security.html 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-response-security.html 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src=""
-<script>
-function createSecureRequest() {
- let img = document.createElement("img");
- img.src = ""
- document.body.appendChild(img);
-}
-
-function test()
-{
- let suite = InspectorTest.createAsyncSuite("Resource.Security");
-
- suite.addTestCase({
- name: "Resource.Security.Certificate",
- description: "Check if a resource has security certificate information.",
- test(resolve, reject) {
- WI.Resource.awaitEvent(WI.Resource.Event.ResponseReceived)
- .then((event) => {
- let resource = event.target;
- InspectorTest.expectThat(resource.loadedSecurely, "Resource should have been loaded securely.");
-
- let responseSecurity = resource.responseSecurity;
- InspectorTest.expectNotNull(responseSecurity, "Resource should have security information.");
-
- let certificate = responseSecurity.certificate;
- InspectorTest.expectNotNull(certificate, "Security information should include certificate information.");
- InspectorTest.expectGreaterThan(certificate.subject.length, 0, "Certificate should have subject");
- InspectorTest.expectGreaterThan(certificate.validFrom, 0, "Certificate should have a validFrom date.");
- InspectorTest.expectGreaterThan(certificate.validUntil, 0, "Certificate should have a validUntil date.");
- })
- .then(resolve, reject);
-
- InspectorTest.evaluateInPage(`createSecureRequest()`)
- .catch(reject);
- }
- });
-
- suite.runTestCasesAndFinish();
-}
-</script>
-</head>
-<body _onload_="runTest()">
- <p>Tests that a resource has security information.</p>
-</body>
-</html>
Copied: trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate-expected.txt (from rev 239697, trunk/LayoutTests/http/tests/inspector/network/resource-response-security-expected.txt) (0 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate-expected.txt 2019-01-07 22:18:59 UTC (rev 239698)
@@ -0,0 +1,12 @@
+Tests for resource security certificate information.
+
+
+== Running test suite: Resource.Security.Certificate
+-- Running test case: Resource.Security.Certificate.Basic
+PASS: Resource should have been loaded securely.
+PASS: Resource should have security information.
+PASS: Security information should include certificate information.
+PASS: Certificate should have subject.
+PASS: Certificate should have a validFrom date.
+PASS: Certificate should have a validUntil date.
+
Copied: trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate.html (from rev 239697, trunk/LayoutTests/http/tests/inspector/network/resource-response-security.html) (0 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate.html (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-security-certificate.html 2019-01-07 22:18:59 UTC (rev 239698)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+<script>
+let requestCount = 0;
+
+function createSecureRequest() {
+ let img = document.createElement("img");
+ img.src = "" + (++requestCount);
+ document.body.appendChild(img);
+}
+
+function test()
+{
+ let suite = InspectorTest.createAsyncSuite("Resource.Security.Certificate");
+
+ suite.addTestCase({
+ name: "Resource.Security.Certificate.Basic",
+ description: "Check if a resource has security certificate information.",
+ test(resolve, reject) {
+ WI.Resource.awaitEvent(WI.Resource.Event.ResponseReceived)
+ .then((event) => {
+ let resource = event.target;
+ InspectorTest.expectThat(resource.loadedSecurely, "Resource should have been loaded securely.");
+
+ let security = resource.security;
+ InspectorTest.expectNotNull(security, "Resource should have security information.");
+
+ let certificate = security.certificate;
+ InspectorTest.expectNotNull(certificate, "Security information should include certificate information.");
+ InspectorTest.expectGreaterThan(certificate.subject.length, 0, "Certificate should have subject.");
+ InspectorTest.expectGreaterThan(certificate.validFrom, 0, "Certificate should have a validFrom date.");
+ InspectorTest.expectGreaterThan(certificate.validUntil, 0, "Certificate should have a validUntil date.");
+ })
+ .then(resolve, reject);
+
+ InspectorTest.evaluateInPage(`createSecureRequest()`)
+ .catch(reject);
+ }
+ });
+
+ suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+ <p>Tests for resource security certificate information.</p>
+</body>
+</html>
Added: trunk/LayoutTests/http/tests/inspector/network/resource-security-connection-expected.txt (0 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-security-connection-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-security-connection-expected.txt 2019-01-07 22:18:59 UTC (rev 239698)
@@ -0,0 +1,11 @@
+Tests for resource security connection information.
+
+
+== Running test suite: Resource.Security.Connection
+-- Running test case: Resource.Security.Connection.Basic
+PASS: Resource should have been loaded securely.
+PASS: Resource should have security information.
+PASS: Security information should include connection information.
+PASS: Connection should have protocol.
+PASS: Connection should have cipher.
+
Added: trunk/LayoutTests/http/tests/inspector/network/resource-security-connection.html (0 => 239698)
--- trunk/LayoutTests/http/tests/inspector/network/resource-security-connection.html (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/network/resource-security-connection.html 2019-01-07 22:18:59 UTC (rev 239698)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+<script>
+let requestCount = 0;
+
+function createSecureRequest() {
+ let img = document.createElement("img");
+ img.src = "" + (++requestCount);
+ document.body.appendChild(img);
+}
+
+function test()
+{
+ let suite = InspectorTest.createAsyncSuite("Resource.Security.Connection");
+
+ suite.addTestCase({
+ name: "Resource.Security.Connection.Basic",
+ description: "Check if a resource has security connection information.",
+ test(resolve, reject) {
+ WI.Resource.awaitEvent(WI.Resource.Event.ResponseReceived)
+ .then((event) => {
+ let resource = event.target;
+ InspectorTest.expectThat(resource.loadedSecurely, "Resource should have been loaded securely.");
+
+ let security = resource.security;
+ InspectorTest.expectNotNull(security, "Resource should have security information.");
+
+ let connection = security.connection;
+ InspectorTest.expectNotNull(connection, "Security information should include connection information.");
+ InspectorTest.expectGreaterThan(connection.protocol.length, 0, "Connection should have protocol.");
+ InspectorTest.expectGreaterThan(connection.cipher.length, 0, "Connection should have cipher.");
+ })
+ .then(resolve, reject);
+
+ InspectorTest.evaluateInPage(`createSecureRequest()`)
+ .catch(reject);
+ }
+ });
+
+ suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+ <p>Tests for resource security connection information.</p>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (239697 => 239698)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1973,7 +1973,8 @@
webkit.org/b/186750 imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2_short_long.https.html [ Pass Failure ]
webkit.org/b/186847 http/tests/inspector/network/resource-sizes-memory-cache.html [ Pass Failure ]
-webkit.org/b/191497 http/tests/inspector/network/resource-response-security.html [ Skip ]
+webkit.org/b/192407 http/tests/inspector/network/resource-security-connection.html [ Skip ]
+webkit.org/b/191497 http/tests/inspector/network/resource-security-certificate.html [ Skip ]
webkit.org/b/191497 http/tests/inspector/network/getSerializedCertificate.html [ Skip ]
webkit.org/b/186851 imported/w3c/web-platform-tests/xhr/formdata.htm [ Pass Failure ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (239697 => 239698)
--- trunk/LayoutTests/platform/mac/TestExpectations 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1110,6 +1110,7 @@
webkit.org/b/183880 [ Debug ] inspector/console/messageAdded-from-named-evaluations.html [ Slow ]
webkit.org/b/156634 inspector/formatting/formatting-_javascript_.html [ Pass Timeout ]
webkit.org/b/158948 inspector/timeline [ Pass Timeout ]
+webkit.org/b/191539 http/tests/inspector/network/resource-security-connection.html [ Skip ]
webkit.org/b/187622 [ Debug ] inspector/view/asynchronous-layout.html [ Pass Timeout ]
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (239697 => 239698)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1003,7 +1003,8 @@
http/tests/xmlviewer [ Skip ]
-webkit.org/b/191498 http/tests/inspector/network/resource-response-security.html [ Skip ]
+webkit.org/b/192406 http/tests/inspector/network/resource-security-connection.html [ Skip ]
+webkit.org/b/191498 http/tests/inspector/network/resource-security-certificate.html [ Skip ]
webkit.org/b/191498 http/tests/inspector/network/getSerializedCertificate.html [ Skip ]
#///////////////////////////////////////////////////////////////////////////////
Modified: trunk/LayoutTests/platform/wpe/TestExpectations (239697 => 239698)
--- trunk/LayoutTests/platform/wpe/TestExpectations 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/LayoutTests/platform/wpe/TestExpectations 2019-01-07 22:18:59 UTC (rev 239698)
@@ -540,7 +540,8 @@
Bug(WPE) fast/dom/HTMLAnchorElement [ Skip ]
-webkit.org/b/191497 http/tests/inspector/network/resource-response-security.html [ Skip ]
+webkit.org/b/192407 http/tests/inspector/network/resource-security-connection.html [ Skip ]
+webkit.org/b/191497 http/tests/inspector/network/resource-security-certificate.html [ Skip ]
webkit.org/b/191497 http/tests/inspector/network/getSerializedCertificate.html [ Skip ]
#////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/Source/_javascript_Core/ChangeLog (239697 => 239698)
--- trunk/Source/_javascript_Core/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,17 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/protocol/Security.json:
+ Add `Connection` type.
+
+ * inspector/protocol/Network.json:
+ Send `Security.Connection` information when request metrics become available.
+
2019-01-04 Tadeu Zagallo <[email protected]>
Baseline version of get_by_id may corrupt metadata
Modified: trunk/Source/_javascript_Core/inspector/protocol/Network.json (239697 => 239698)
--- trunk/Source/_javascript_Core/inspector/protocol/Network.json 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/_javascript_Core/inspector/protocol/Network.json 2019-01-07 22:18:59 UTC (rev 239698)
@@ -93,7 +93,8 @@
{ "name": "requestBodyBytesSent", "type": "number", "optional": true, "description": "Total HTTP request body bytes sent over the network." },
{ "name": "responseHeaderBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response header bytes received over the network." },
{ "name": "responseBodyBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response body bytes received over the network." },
- { "name": "responseBodyDecodedSize", "type": "number", "optional": true, "description": "Total decoded response body size in bytes." }
+ { "name": "responseBodyDecodedSize", "type": "number", "optional": true, "description": "Total decoded response body size in bytes." },
+ { "name": "securityConnection", "$ref": "Security.Connection", "optional": true, "description": "Connection information for the completed request." }
]
},
{
Modified: trunk/Source/_javascript_Core/inspector/protocol/Security.json (239697 => 239698)
--- trunk/Source/_javascript_Core/inspector/protocol/Security.json 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/_javascript_Core/inspector/protocol/Security.json 2019-01-07 22:18:59 UTC (rev 239698)
@@ -3,6 +3,15 @@
"description": "Security domain allows the frontend to query for information relating to the security of the page (e.g. HTTPS info, TLS info, user activity, etc.).",
"types": [
{
+ "id": "Connection",
+ "type": "object",
+ "description": "Information about a SSL connection to display in the frontend.",
+ "properties": [
+ { "name": "protocol", "type": "string", "optional": true },
+ { "name": "cipher", "type": "string", "optional": true }
+ ]
+ },
+ {
"id": "Certificate",
"type": "object",
"description": "Information about a SSL certificate to display in the frontend.",
@@ -19,6 +28,7 @@
"type": "object",
"description": "Security information for a given Network.Response.",
"properties": [
+ { "name": "connection", "$ref": "Connection", "optional": true },
{ "name": "certificate", "$ref": "Certificate", "optional": true }
]
}
Modified: trunk/Source/WebCore/ChangeLog (239697 => 239698)
--- trunk/Source/WebCore/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebCore/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,23 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ Test: http/tests/inspector/network/resource-security-connection.html
+
+ * platform/network/NetworkLoadMetrics.h:
+ (WebCore::NetworkLoadMetrics:isolatedCopy):
+ (WebCore::NetworkLoadMetrics:clearNonTimingData):
+ (WebCore::NetworkLoadMetrics:operator==):
+ (WebCore::NetworkLoadMetrics:encode):
+ (WebCore::NetworkLoadMetrics:decode):
+
+ * inspector/agents/InspectorNetworkAgent.cpp:
+ (WebCore::InspectorNetworkAgent::buildObjectForMetrics):
+
2019-01-07 Eric Carlson <[email protected]>
Deactivate audio session whenever possible
Modified: trunk/Source/WebCore/PAL/ChangeLog (239697 => 239698)
--- trunk/Source/WebCore/PAL/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebCore/PAL/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,13 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ * pal/spi/cf/CFNetworkSPI.h:
+
2019-01-04 Jer Noble <[email protected]>
Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (239697 => 239698)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h 2019-01-07 22:18:59 UTC (rev 239698)
@@ -212,6 +212,13 @@
@end
#endif
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+@interface NSURLSessionTaskTransactionMetrics ()
+@property (assign) SSLProtocol _negotiatedTLSProtocol;
+@property (assign) SSLCipherSuite _negotiatedTLSCipher;
+@end
+#endif
+
extern NSString * const NSURLAuthenticationMethodOAuth;
#endif // defined(__OBJC__)
Modified: trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp (239697 => 239698)
--- trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp 2019-01-07 22:18:59 UTC (rev 239698)
@@ -264,6 +264,17 @@
if (networkLoadMetrics.responseBodyDecodedSize != std::numeric_limits<uint64_t>::max())
metrics->setResponseBodyDecodedSize(networkLoadMetrics.responseBodyDecodedSize);
+ auto connectionPayload = Inspector::Protocol::Security::Connection::create()
+ .release();
+
+ if (!networkLoadMetrics.tlsProtocol.isEmpty())
+ connectionPayload->setProtocol(networkLoadMetrics.tlsProtocol);
+
+ if (!networkLoadMetrics.tlsCipher.isEmpty())
+ connectionPayload->setCipher(networkLoadMetrics.tlsCipher);
+
+ metrics->setSecurityConnection(WTFMove(connectionPayload));
+
return metrics;
}
Modified: trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h (239697 => 239698)
--- trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebCore/platform/network/NetworkLoadMetrics.h 2019-01-07 22:18:59 UTC (rev 239698)
@@ -71,6 +71,8 @@
copy.remoteAddress = remoteAddress.isolatedCopy();
copy.connectionIdentifier = connectionIdentifier.isolatedCopy();
copy.priority = priority;
+ copy.tlsProtocol = tlsProtocol.isolatedCopy();
+ copy.tlsCipher = tlsCipher.isolatedCopy();
copy.requestHeaders = requestHeaders.isolatedCopy();
copy.requestHeaderBytesSent = requestHeaderBytesSent;
@@ -102,6 +104,8 @@
remoteAddress = String();
connectionIdentifier = String();
priority = NetworkLoadPriority::Unknown;
+ tlsProtocol = String();
+ tlsCipher = String();
requestHeaders.clear();
requestHeaderBytesSent = std::numeric_limits<uint32_t>::max();
requestBodyBytesSent = std::numeric_limits<uint64_t>::max();
@@ -125,6 +129,8 @@
&& remoteAddress == other.remoteAddress
&& connectionIdentifier == other.connectionIdentifier
&& priority == other.priority
+ && tlsProtocol == other.tlsProtocol
+ && tlsCipher == other.tlsCipher
&& requestHeaders == other.requestHeaders
&& requestHeaderBytesSent == other.requestHeaderBytesSent
&& requestBodyBytesSent == other.requestBodyBytesSent
@@ -162,6 +168,9 @@
String connectionIdentifier;
NetworkLoadPriority priority;
+ String tlsProtocol;
+ String tlsCipher;
+
// Whether or not all of the properties (0 or otherwise) have been set.
bool complete { false };
@@ -198,6 +207,8 @@
encoder << remoteAddress;
encoder << connectionIdentifier;
encoder << priority;
+ encoder << tlsProtocol;
+ encoder << tlsCipher;
encoder << requestHeaders;
encoder << requestHeaderBytesSent;
encoder << requestBodyBytesSent;
@@ -222,6 +233,8 @@
&& decoder.decode(metrics.remoteAddress)
&& decoder.decode(metrics.connectionIdentifier)
&& decoder.decode(metrics.priority)
+ && decoder.decode(metrics.tlsProtocol)
+ && decoder.decode(metrics.tlsCipher)
&& decoder.decode(metrics.requestHeaders)
&& decoder.decode(metrics.requestHeaderBytesSent)
&& decoder.decode(metrics.requestBodyBytesSent)
Modified: trunk/Source/WebInspectorUI/ChangeLog (239697 => 239698)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,33 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Models/Resource.js:
+ (WI.Resource):
+ (WI.Resource.prototype.get security): Added.
+ (WI.Resource.prototype.updateForResponse):
+ (WI.Resource.prototype.updateWithMetrics):
+ (WI.Resource.prototype.get responseSecurity): Deleted.
+
+ * UserInterface/Views/ResourceSecurityContentView.js:
+ (WI.ResourceSecurityContentView):
+ (WI.ResourceSecurityContentView.prototype.initialLayout):
+ (WI.ResourceSecurityContentView.prototype.layout):
+ (WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
+ (WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
+ (WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.
+ * UserInterface/Views/ResourceSecurityContentView.css:
+ (body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
+ (@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
+ (body[dir] .resource-security > section.certificate > .details): Deleted.
+ (@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.
+
+ * Localizations/en.lproj/localizedStrings.js:
+
2019-01-07 Nikita Vasilyev <[email protected]>
Web Inspector: "white" isn't recognized as a color keyword
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (239697 => 239698)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2019-01-07 22:18:59 UTC (rev 239698)
@@ -188,6 +188,7 @@
localizedStrings["Child Layers"] = "Child Layers";
localizedStrings["Child added to "] = "Child added to ";
localizedStrings["Children"] = "Children";
+localizedStrings["Cipher"] = "Cipher";
localizedStrings["Classes"] = "Classes";
localizedStrings["Clear Filters"] = "Clear Filters";
localizedStrings["Clear Log"] = "Clear Log";
@@ -621,6 +622,8 @@
localizedStrings["No Search Results"] = "No Search Results";
localizedStrings["No Watch Expressions"] = "No Watch Expressions";
localizedStrings["No audit selected"] = "No audit selected";
+localizedStrings["No certificate security information."] = "No certificate security information.";
+localizedStrings["No connection security information."] = "No connection security information.";
localizedStrings["No matching ARIA role"] = "No matching ARIA role";
localizedStrings["No preview available"] = "No preview available";
localizedStrings["No request cookies."] = "No request cookies.";
@@ -629,8 +632,6 @@
localizedStrings["No request, served from the memory cache."] = "No request, served from the memory cache.";
localizedStrings["No response cookies."] = "No response cookies.";
localizedStrings["No response headers"] = "No response headers";
-localizedStrings["No response security certificate."] = "No response security certificate.";
-localizedStrings["No response security information."] = "No response security information.";
localizedStrings["Node"] = "Node";
localizedStrings["Node Removed"] = "Node Removed";
localizedStrings["Nodes"] = "Nodes";
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (239697 => 239698)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js 2019-01-07 22:18:59 UTC (rev 239698)
@@ -70,7 +70,7 @@
this._failureReasonText = null;
this._receivedNetworkLoadMetrics = false;
this._responseSource = WI.Resource.ResponseSource.Unknown;
- this._responseSecurity = null;
+ this._security = null;
this._timingData = new WI.ResourceTimingData(this);
this._protocol = null;
this._priority = WI.Resource.NetworkPriority.Unknown;
@@ -307,7 +307,7 @@
get statusCode() { return this._statusCode; }
get statusText() { return this._statusText; }
get responseSource() { return this._responseSource; }
- get responseSecurity() { return this._responseSecurity; }
+ get security() { return this._security; }
get timingData() { return this._timingData; }
get protocol() { return this._protocol; }
get priority() { return this._priority; }
@@ -715,8 +715,7 @@
if (source)
this._responseSource = WI.Resource.responseSourceFromPayload(source);
- if (security)
- this._responseSecurity = security;
+ this._security = security || {};
const headerBaseSize = 12; // Length of "HTTP/1.1 ", " ", and "\r\n".
const headerPad = 4; // Length of ": " and "\r\n".
@@ -793,6 +792,12 @@
this.dispatchEventToListeners(WI.Resource.Event.TransferSizeDidChange);
}
+ if (metrics.securityConnection) {
+ if (!this._security)
+ this._security = {};
+ this._security.connection = metrics.securityConnection;
+ }
+
this.dispatchEventToListeners(WI.Resource.Event.MetricsDidChange);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.css (239697 => 239698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.css 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.css 2019-01-07 22:18:59 UTC (rev 239698)
@@ -23,7 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-body[dir] .resource-security > section.certificate > .details {
+body[dir] .resource-security > section:matches(.connection, .certificate) > .details {
border-color: var(--network-dns-color);
}
@@ -54,7 +54,7 @@
}
@media (prefers-dark-interface) {
- body[dir] .resource-security > section.certificate > .details {
+ body[dir] .resource-security > section:matches(.connection, .certificate) > .details {
border-color: var(--network-pseudo-header-color);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js (239697 => 239698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSecurityContentView.js 2019-01-07 22:18:59 UTC (rev 239698)
@@ -34,6 +34,7 @@
this._resource = resource;
this._insecureMessageElement = null;
+ this._needsConnectionRefresh = true;
this._needsCertificateRefresh = true;
this._searchQuery = null;
@@ -52,10 +53,14 @@
{
super.initialLayout();
+ this._connectionSection = new WI.ResourceDetailsSection(WI.UIString("Connection"), "connection");
+ this.element.appendChild(this._connectionSection.element);
+
this._certificateSection = new WI.ResourceDetailsSection(WI.UIString("Certificate"), "certificate");
this.element.appendChild(this._certificateSection.element);
this._resource.addEventListener(WI.Resource.Event.ResponseReceived, this._handleResourceResponseReceived, this);
+ this._resource.addEventListener(WI.Resource.Event.MetricsDidChange, this._handleResourceMetricsDidChange, this);
}
layout()
@@ -69,6 +74,11 @@
return;
}
+ if (this._needsConnectionRefresh) {
+ this._needsConnectionRefresh = false;
+ this._refreshConnectionSection();
+ }
+
if (this._needsCertificateRefresh) {
this._needsCertificateRefresh = false;
this._refreshCetificateSection();
@@ -166,20 +176,41 @@
// Private
+ _refreshConnectionSection()
+ {
+ let detailsElement = this._connectionSection.detailsElement;
+ detailsElement.removeChildren();
+
+ let security = this._resource.security;
+ if (isEmptyObject(security)) {
+ this._connectionSection.markIncompleteSectionWithMessage(WI.UIString("No connection security information."));
+ return;
+ }
+
+ let connection = security.connection;
+ if (isEmptyObject(connection) || Object.values(connection).every((value) => !value)) {
+ this._connectionSection.markIncompleteSectionWithMessage(WI.UIString("No connection security information."));
+ return;
+ }
+
+ this._connectionSection.appendKeyValuePair(WI.UIString("Protocol"), connection.protocol || emDash);
+ this._connectionSection.appendKeyValuePair(WI.UIString("Cipher"), connection.cipher || emDash);
+ }
+
_refreshCetificateSection()
{
let detailsElement = this._certificateSection.detailsElement;
detailsElement.removeChildren();
- let responseSecurity = this._resource.responseSecurity;
- if (!responseSecurity) {
- this._certificateSection.markIncompleteSectionWithMessage(WI.UIString("No response security information."));
+ let security = this._resource.security;
+ if (isEmptyObject(security)) {
+ this._certificateSection.markIncompleteSectionWithMessage(WI.UIString("No certificate security information."));
return;
}
- let certificate = responseSecurity.certificate;
- if (!certificate) {
- this._certificateSection.markIncompleteSectionWithMessage(WI.UIString("No response security certificate."));
+ let certificate = security.certificate;
+ if (isEmptyObject(certificate) || Object.values(certificate).every((value) => !value)) {
+ this._certificateSection.markIncompleteSectionWithMessage(WI.UIString("No certificate security information."));
return;
}
@@ -207,7 +238,7 @@
pairElement.classList.add("show-certificate");
}
- this._certificateSection.appendKeyValuePair(WI.UIString("Subject"), certificate.subject);
+ this._certificateSection.appendKeyValuePair(WI.UIString("Subject"), certificate.subject || emDash);
let appendFormattedDate = (key, timestamp) => {
if (isNaN(timestamp))
@@ -309,4 +340,10 @@
this._needsCertificateRefresh = true;
this.needsLayout();
}
+
+ _handleResourceMetricsDidChange(event)
+ {
+ this._needsConnectionRefresh = true;
+ this.needsLayout();
+ }
};
Modified: trunk/Source/WebKit/ChangeLog (239697 => 239698)
--- trunk/Source/WebKit/ChangeLog 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebKit/ChangeLog 2019-01-07 22:18:59 UTC (rev 239698)
@@ -1,3 +1,16 @@
+2019-01-07 Devin Rousso <[email protected]>
+
+ Web Inspector: Network: show secure connection details per-request
+ https://bugs.webkit.org/show_bug.cgi?id=191539
+ <rdar://problem/45979891>
+
+ Reviewed by Joseph Pecoraro.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (stringForSSLProtocol): Added.
+ (stringForSSLCipher): Added.
+ (-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
+
2019-01-07 Joseph Pecoraro <[email protected]>
Web Inspector: Remote inspector can crash if attempting to navigate inspector page
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (239697 => 239698)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-01-07 22:13:28 UTC (rev 239697)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-01-07 22:18:59 UTC (rev 239698)
@@ -52,6 +52,7 @@
#import <wtf/NeverDestroyed.h>
#import <wtf/ProcessPrivilege.h>
#import <wtf/URL.h>
+#import <wtf/text/WTFString.h>
using namespace WebKit;
@@ -93,6 +94,221 @@
return WebCore::NetworkLoadPriority::Medium;
}
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+static String stringForSSLProtocol(SSLProtocol protocol)
+{
+ switch (protocol) {
+ case kDTLSProtocol1:
+ return "DTLS 1.0"_s;
+ case kSSLProtocol2:
+ return "SSL 2.0"_s;
+ case kSSLProtocol3:
+ return "SSL 3.0"_s;
+ case kSSLProtocol3Only:
+ return "SSL 3.0 (Only)"_s;
+ case kTLSProtocol1:
+ return "TLS 1.0"_s;
+ case kTLSProtocol1Only:
+ return "TLS 1.0 (Only)"_s;
+ case kTLSProtocol11:
+ return "TLS 1.1"_s;
+ case kTLSProtocol12:
+ return "TLS 1.2"_s;
+ case kTLSProtocol13:
+ return "TLS 1.3"_s;
+ case kSSLProtocolAll:
+ return "All";
+ case kSSLProtocolUnknown:
+ return "Unknown";
+ case kTLSProtocolMaxSupported:
+ default:
+ ASSERT_NOT_REACHED();
+ return emptyString();
+ }
+}
+
+static String stringForSSLCipher(SSLCipherSuite cipher)
+{
+#define STRINGIFY_CIPHER(cipher) \
+ case cipher: \
+ return "" #cipher ""_s
+
+ switch (cipher) {
+ STRINGIFY_CIPHER(SSL_RSA_EXPORT_WITH_RC4_40_MD5);
+ STRINGIFY_CIPHER(SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_IDEA_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_RSA_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_DSS_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_RSA_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DHE_DSS_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DHE_RSA_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_anon_EXPORT_WITH_RC4_40_MD5);
+ STRINGIFY_CIPHER(SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_DH_anon_WITH_DES_CBC_SHA);
+ STRINGIFY_CIPHER(SSL_FORTEZZA_DMS_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_anon_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_anon_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_anon_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_ECDH_anon_WITH_AES_256_CBC_SHA);
+ // STRINGIFY_CIPHER(SSL_NULL_WITH_NULL_NULL);
+ STRINGIFY_CIPHER(TLS_NULL_WITH_NULL_NULL);
+ // STRINGIFY_CIPHER(SSL_RSA_WITH_NULL_MD5);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_NULL_MD5);
+ // STRINGIFY_CIPHER(SSL_RSA_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_NULL_SHA);
+ // STRINGIFY_CIPHER(SSL_RSA_WITH_RC4_128_MD5);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_RC4_128_MD5);
+ // STRINGIFY_CIPHER(SSL_RSA_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_RC4_128_SHA);
+ // STRINGIFY_CIPHER(SSL_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_NULL_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_256_CBC_SHA256);
+ // STRINGIFY_CIPHER(SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA);
+ // STRINGIFY_CIPHER(SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA);
+ // STRINGIFY_CIPHER(SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA);
+ // STRINGIFY_CIPHER(SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_256_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_256_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_256_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_256_CBC_SHA256);
+ // STRINGIFY_CIPHER(SSL_DH_anon_WITH_RC4_128_MD5);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_RC4_128_MD5);
+ // STRINGIFY_CIPHER(SSL_DH_anon_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_256_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_RC4_128_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_128_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_256_CBC_SHA);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_NULL_SHA);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_RSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_RSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_DSS_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_DSS_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DH_anon_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_NULL_SHA256);
+ STRINGIFY_CIPHER(TLS_PSK_WITH_NULL_SHA384);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_NULL_SHA256);
+ STRINGIFY_CIPHER(TLS_DHE_PSK_WITH_NULL_SHA384);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_NULL_SHA256);
+ STRINGIFY_CIPHER(TLS_RSA_PSK_WITH_NULL_SHA384);
+ STRINGIFY_CIPHER(TLS_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_CHACHA20_POLY1305_SHA256);
+ STRINGIFY_CIPHER(TLS_AES_128_CCM_SHA256);
+ STRINGIFY_CIPHER(TLS_AES_128_CCM_8_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384);
+ STRINGIFY_CIPHER(TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256);
+ STRINGIFY_CIPHER(TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256);
+ STRINGIFY_CIPHER(TLS_EMPTY_RENEGOTIATION_INFO_SCSV);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_RC2_CBC_MD5);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_IDEA_CBC_MD5);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_DES_CBC_MD5);
+ STRINGIFY_CIPHER(SSL_RSA_WITH_3DES_EDE_CBC_MD5);
+ STRINGIFY_CIPHER(SSL_NO_SUCH_CIPHERSUITE);
+ default:
+ ASSERT_NOT_REACHED();
+ return emptyString();
+ }
+
+#undef STRINGIFY_CIPHER
+}
+#endif
+
@interface WKNetworkSessionDelegate : NSObject <NSURLSessionDataDelegate> {
RefPtr<WebKit::NetworkSessionCocoa> _session;
bool _withCredentials;
@@ -445,6 +661,11 @@
networkLoadMetrics.connectionIdentifier = String([m._connectionIdentifier UUIDString]);
#endif
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+ networkLoadMetrics.tlsProtocol = stringForSSLProtocol(m._negotiatedTLSProtocol);
+ networkLoadMetrics.tlsCipher = stringForSSLCipher(m._negotiatedTLSCipher);
+#endif
+
__block WebCore::HTTPHeaderMap requestHeaders;
[m.request.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSString *value, BOOL *) {
requestHeaders.set(String(name), String(value));