aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-08-23 10:18:00 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-08-23 10:18:00 +0000
commit43e358c72da0d655a222432f884138fa8fc9a7a5 (patch)
tree88a4f7c21a269214e55c6bfabe3c00a043624cdf
parent0ad797d0d821abbb40b870b786d6548a99426e3b (diff)
parent4d4f5f53224fba2c92f2b6fa5d8842b8f01c16ab (diff)
downloadlibcore-android12L-gsi.tar.gz
Merge "Use tls 1.3 by default in TestSSLContext." into android12L-gsiandroid12L-gsi
-rw-r--r--luni/src/test/java/libcore/java/net/URLConnectionTest.java6
-rw-r--r--support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
index aecc1ad8c45..9c79b5cbd6a 100644
--- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java
+++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
@@ -564,7 +564,7 @@ public final class URLConnectionTest {
RecordedRequest request = server.takeRequest();
assertEquals("GET /foo HTTP/1.1", request.getRequestLine());
- assertEquals("TLSv1.2", request.getSslProtocol());
+ assertEquals("TLSv1.3", request.getSslProtocol());
}
@Test public void connectViaHttpsReusingConnections() throws IOException, InterruptedException {
@@ -2285,7 +2285,7 @@ public final class URLConnectionTest {
+ "CN=Local Host 3, "
+ "CN=Test Intermediate Certificate Authority 2, "
+ "CN=Test Root Certificate Authority 1"
- + "] ECDHE_RSA"),
+ + "] GENERIC"),
trustManager.calls);
} finally {
HttpsURLConnection.setDefaultHostnameVerifier(defaultHostnameVerifier);
@@ -3094,7 +3094,7 @@ public final class URLConnectionTest {
@Test public void noSslFallback_defaultProtocols() throws Exception {
// Will need to be updated if the enabled protocols in Android's SSLSocketFactory change
- String[] expectedEnabledProtocols = { "TLSv1.2", "TLSv1.1", "TLSv1" };
+ String[] expectedEnabledProtocols = { "TLSv1.3", "TLSv1.2", "TLSv1.1", "TLSv1" };
TestSSLContext testSSLContext = createDefaultTestSSLContext();
SSLSocketFactory serverSocketFactory = testSSLContext.serverContext.getSocketFactory();
diff --git a/support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java b/support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java
index bc6cd7cbbc0..ca96cadf9db 100644
--- a/support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java
+++ b/support/src/test/java/libcore/javax/net/ssl/TestSSLContext.java
@@ -260,7 +260,7 @@ public final class TestSSLContext extends Assert {
public static TestSSLContext createWithAdditionalKeyManagers(
TestKeyStore client, TestKeyStore server,
KeyManager[] additionalClientKeyManagers, KeyManager[] additionalServerKeyManagers) {
- String protocol = "TLSv1.2";
+ String protocol = "TLSv1.3";
KeyManager[] clientKeyManagers = concat(client.keyManagers, additionalClientKeyManagers);
KeyManager[] serverKeyManagers = concat(server.keyManagers, additionalServerKeyManagers);
SSLContext clientContext =