Skip to content

Commit 8e2c498

Browse files
author
Alexey Bakhtin
committed
8245263: Enable TLSv1.3 by default on JDK 8u for Client roles
Reviewed-by: mbalao
1 parent 0869fc0 commit 8e2c498

15 files changed

+29
-27
lines changed

jdk/src/share/classes/sun/security/ssl/SSLContextImpl.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -940,12 +940,14 @@ private static List<ProtocolVersion> customizedProtocols(
940940
static ProtocolVersion[] getProtocols() {
941941
if (SunJSSE.isFIPS()) {
942942
return new ProtocolVersion[]{
943+
ProtocolVersion.TLS13,
943944
ProtocolVersion.TLS12,
944945
ProtocolVersion.TLS11,
945946
ProtocolVersion.TLS10
946947
};
947948
} else {
948949
return new ProtocolVersion[]{
950+
ProtocolVersion.TLS13,
949951
ProtocolVersion.TLS12,
950952
ProtocolVersion.TLS11,
951953
ProtocolVersion.TLS10,

jdk/test/javax/net/ssl/SSLSession/ResumeTLS13withSNI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @test
2929
* @bug 8211806
3030
* @summary TLS 1.3 handshake server name indication is missing on a session resume
31-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" ResumeTLS13withSNI
31+
* @run main/othervm ResumeTLS13withSNI
3232
*/
3333

3434
import javax.net.ssl.*;

jdk/test/javax/net/ssl/SSLSocket/Tls13PacketSize.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @bug 8221253
3232
* @summary TLSv1.3 may generate TLSInnerPlainText longer than 2^14+1 bytes
3333
* @library /javax/net/ssl/templates
34-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" Tls13PacketSize
34+
* @run main/othervm Tls13PacketSize
3535
*/
3636
import java.io.InputStream;
3737
import java.io.OutputStream;

jdk/test/javax/net/ssl/Stapling/HttpsUrlConnClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @summary OCSP Stapling for TLS
3131
* @library ../../../../java/security/testlibrary
3232
* @build CertificateBuilder SimpleOCSPServer
33-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" HttpsUrlConnClient
33+
* @run main/othervm HttpsUrlConnClient
3434
*/
3535

3636
import java.io.*;

jdk/test/javax/net/ssl/Stapling/SSLEngineWithStapling.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @summary OCSP Stapling for TLS
3131
* @library ../../../../java/security/testlibrary
3232
* @build CertificateBuilder SimpleOCSPServer
33-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" SSLEngineWithStapling
33+
* @run main/othervm SSLEngineWithStapling
3434
*/
3535

3636
/**

jdk/test/javax/net/ssl/Stapling/SSLSocketWithStapling.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @summary OCSP Stapling for TLS
3131
* @library ../../../../java/security/testlibrary
3232
* @build CertificateBuilder SimpleOCSPServer
33-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" SSLSocketWithStapling
33+
* @run main/othervm SSLSocketWithStapling
3434
*/
3535

3636
import java.io.*;

jdk/test/javax/net/ssl/Stapling/StapleEnableProps.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @summary SSLContextImpl.statusResponseManager should be generated if required
3131
* @library ../../../../java/security/testlibrary
3232
* @build CertificateBuilder SimpleOCSPServer
33-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" StapleEnableProps
33+
* @run main/othervm StapleEnableProps
3434
*/
3535

3636
import javax.net.ssl.*;

jdk/test/javax/net/ssl/TLS/TLSClientPropertyTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static void main(String[] args) throws Exception {
7171
}
7272
contextProtocol = null;
7373
expectedDefaultProtos = new String[] {
74-
"TLSv1.2"
74+
"TLSv1.2", "TLSv1.3"
7575
};
7676
break;
7777
case "SSLv3":
@@ -90,13 +90,13 @@ public static void main(String[] args) throws Exception {
9090
};
9191
break;
9292
case "TLSv12":
93-
case "TLS":
9493
contextProtocol = "TLSv1.2";
9594
expectedDefaultProtos = new String[] {
9695
"TLSv1.2"
9796
};
9897
break;
9998
case "TLSv13":
99+
case "TLS":
100100
contextProtocol = "TLSv1.3";
101101
expectedDefaultProtos = new String[] {
102102
"TLSv1.2", "TLSv1.3"

jdk/test/javax/net/ssl/sanity/ciphersuites/CheckCipherSuites.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @test
2626
* @bug 4750141 4895631 8217579 8163326
2727
* @summary Check enabled and supported ciphersuites are correct
28-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" CheckCipherSuites default
29-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3" CheckCipherSuites limited
28+
* @run main/othervm CheckCipherSuites default
29+
* @run main/othervm CheckCipherSuites limited
3030
*/
3131

3232
import java.util.*;

jdk/test/sun/security/ssl/HandshakeHash/HandshakeHashCloneExhaustion.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
* @library /javax/net/ssl/templates
3636
* @library /lib/security
3737
* @compile DigestBase.java
38-
* @run main/othervm -Djdk.tls.client.protocols="TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3"
39-
* HandshakeHashCloneExhaustion TLSv1.3 TLS_AES_128_GCM_SHA256
38+
* @run main/othervm HandshakeHashCloneExhaustion
39+
* TLSv1.3 TLS_AES_128_GCM_SHA256
4040
* @run main/othervm HandshakeHashCloneExhaustion
4141
* TLSv1.2 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
4242
* @run main/othervm HandshakeHashCloneExhaustion

jdk/test/sun/security/ssl/SSLContextImpl/CustomizedServerDefaultProtocols.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,10 +52,10 @@ public class CustomizedServerDefaultProtocols {
5252
enum ContextVersion {
5353
TLS_CV_01("SSL",
5454
new String[]{"SSLv3", "TLSv1", "TLSv1.1"},
55-
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"}),
55+
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
5656
TLS_CV_02("TLS",
5757
new String[]{"SSLv3", "TLSv1", "TLSv1.1"},
58-
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"}),
58+
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
5959
TLS_CV_03("SSLv3",
6060
supportedProtocols,
6161
new String[]{"SSLv3", "TLSv1"}),
@@ -73,7 +73,7 @@ enum ContextVersion {
7373
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
7474
TLS_CV_08("Default",
7575
new String[]{"SSLv3", "TLSv1", "TLSv1.1"},
76-
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"});
76+
new String[]{"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"});
7777

7878
final String contextVersion;
7979
final String[] serverEnabledProtocols;

jdk/test/sun/security/ssl/SSLContextImpl/DefaultEnabledProtocols.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -49,9 +49,9 @@
4949
public class DefaultEnabledProtocols {
5050
enum ContextVersion {
5151
TLS_CV_01("SSL",
52-
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"}),
52+
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
5353
TLS_CV_02("TLS",
54-
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"}),
54+
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
5555
TLS_CV_03("SSLv3",
5656
new String[] {"SSLv3", "TLSv1"}),
5757
TLS_CV_04("TLSv1",
@@ -63,7 +63,7 @@ enum ContextVersion {
6363
TLS_CV_07("TLSv1.3",
6464
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"}),
6565
TLS_CV_08("Default",
66-
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"});
66+
new String[] {"SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"});
6767

6868
final String contextVersion;
6969
final String[] enabledProtocols;

jdk/test/sun/security/ssl/SSLSessionImpl/ResumeChecksClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2 ResumeChecksClient BASIC
3030
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksClient BASIC
3131
* @run main/othervm ResumeChecksClient BASIC
32-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 ResumeChecksClient VERSION_2_TO_3
33-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 ResumeChecksClient VERSION_3_TO_2
32+
* @run main/othervm ResumeChecksClient VERSION_2_TO_3
33+
* @run main/othervm ResumeChecksClient VERSION_3_TO_2
3434
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksClient CIPHER_SUITE
3535
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksClient SIGNATURE_SCHEME
3636
*

jdk/test/sun/security/ssl/SSLSessionImpl/ResumeChecksServer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2 ResumeChecksServer CLIENT_AUTH
3333
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksServer CLIENT_AUTH
3434
* @run main/othervm ResumeChecksServer CLIENT_AUTH
35-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 ResumeChecksServer VERSION_2_TO_3
36-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 ResumeChecksServer VERSION_3_TO_2
35+
* @run main/othervm ResumeChecksServer VERSION_2_TO_3
36+
* @run main/othervm ResumeChecksServer VERSION_3_TO_2
3737
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksServer CIPHER_SUITE
3838
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 ResumeChecksServer SIGNATURE_SCHEME
3939
*

jdk/test/sun/security/ssl/X509TrustManagerImpl/TooManyCAs.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* @bug 8206925
2727
* @library /javax/net/ssl/templates
2828
* @summary Support the certificate_authorities extension
29-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 TooManyCAs
30-
* @run main/othervm -Djdk.tls.client.protocols=TLSv1.3 -Djdk.tls.client.enableCAExtension=true TooManyCAs
29+
* @run main/othervm TooManyCAs
30+
* @run main/othervm -Djdk.tls.client.enableCAExtension=true TooManyCAs
3131
*/
3232
import javax.net.ssl.*;
3333
import javax.security.auth.x500.X500Principal;

0 commit comments

Comments
 (0)