mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8368493: Disable most test JSSE debug output by default, and increase the test default maximum output log size
Reviewed-by: jnimeh, hchao
This commit is contained in:
parent
30be94086a
commit
87d881fee0
@ -6,4 +6,3 @@ modules = \
|
||||
java.security.jgss/sun.security.krb5.internal:+open \
|
||||
java.security.jgss/sun.security.krb5.internal.ktab \
|
||||
java.base/sun.security.util
|
||||
maxOutputSize = 2500000
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,7 @@
|
||||
* @library /test/lib
|
||||
* @modules jdk.httpserver
|
||||
* @build jdk.test.lib.net.SimpleSSLContext
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake,record Equals
|
||||
* @run main/othervm Equals
|
||||
*/
|
||||
import com.sun.net.httpserver.*;
|
||||
import java.net.*;
|
||||
@ -38,9 +38,24 @@ import jdk.test.lib.net.SimpleSSLContext;
|
||||
|
||||
public class Equals {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake,record
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
static SSLContext ctx;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake,record");
|
||||
}
|
||||
|
||||
HttpsServer s2 = null;
|
||||
ExecutorService executor = null;
|
||||
try {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -99,7 +99,7 @@ public class NoAuthClientAuth {
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static boolean debug = true;
|
||||
private static boolean debug = false;
|
||||
|
||||
private SSLContext sslc;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -54,7 +54,7 @@ public class ResumeTLS13withSNI {
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = true;
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final ByteBuffer clientOut =
|
||||
ByteBuffer.wrap("Hi Server, I'm Client".getBytes());
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,11 +43,20 @@ import javax.net.ssl.StandardConstants;
|
||||
* between the server and the client happens correctly without any
|
||||
* errors
|
||||
* @library /javax/net/ssl/templates
|
||||
* @run main/othervm -Djavax.net.debug=all
|
||||
* ServerNameRejectedTLSSessionResumption
|
||||
* @run main/othervm ServerNameRejectedTLSSessionResumption
|
||||
*/
|
||||
public class ServerNameRejectedTLSSessionResumption
|
||||
extends SSLContextTemplate {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final String CLIENT_REQUESTED_SNI = "client.local";
|
||||
// dummy host, no connection is attempted in this test
|
||||
@ -56,6 +65,10 @@ public class ServerNameRejectedTLSSessionResumption
|
||||
private static final int PEER_PORT = 12345;
|
||||
|
||||
public static void main(final String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
new ServerNameRejectedTLSSessionResumption().runTest();
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -71,7 +71,7 @@ public class SSLEngineExplorerMatchedSNI extends SSLEngineService {
|
||||
/*
|
||||
* Turn on SSL debugging?
|
||||
*/
|
||||
static boolean debug = true;
|
||||
static boolean debug = false;
|
||||
|
||||
/*
|
||||
* Define the server side of the test.
|
||||
|
||||
@ -99,13 +99,13 @@ public class SSLEngineWithStapling {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = true;
|
||||
private static final boolean debug = false;
|
||||
|
||||
private SSLEngine clientEngine; // client Engine
|
||||
private ByteBuffer clientOut; // write side of clientEngine
|
||||
@ -151,7 +151,7 @@ public class SSLEngineWithStapling {
|
||||
*/
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
// Create the PKI we will use for the test and start the OCSP servers
|
||||
|
||||
1
test/jdk/javax/net/ssl/TEST.properties
Normal file
1
test/jdk/javax/net/ssl/TEST.properties
Normal file
@ -0,0 +1 @@
|
||||
maxOutputSize=500000
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,6 +27,17 @@ import java.security.Security;
|
||||
|
||||
public class TestJSSE {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,record
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final String LOCAL_IP = InetAddress.getLoopbackAddress().getHostAddress();
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
@ -35,7 +46,9 @@ public class TestJSSE {
|
||||
Security.setProperty("jdk.tls.disabledAlgorithms", "");
|
||||
|
||||
// enable debug output
|
||||
System.setProperty("javax.net.debug", "ssl,record");
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,record");
|
||||
}
|
||||
|
||||
String srvProtocol = System.getProperty("SERVER_PROTOCOL");
|
||||
String clnProtocol = System.getProperty("CLIENT_PROTOCOL");
|
||||
|
||||
@ -49,98 +49,112 @@ import javax.net.ssl.TrustManagerFactory;
|
||||
* @bug 8205111
|
||||
* @enablePreview
|
||||
* @summary Test TLS with different types of supported keys.
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha1 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha512 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ec_rsa_pkcs1_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_sha1 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_secp384r1_sha384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha1 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha512 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 ec_rsa_pkcs1_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_sha1 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_secp384r1_sha384
|
||||
* TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_secp521r1_sha512
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_secp521r1_sha512
|
||||
* TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha512 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha512 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha512 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha256 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha384 TLS_AES_128_GCM_SHA256
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha512 TLS_AES_128_GCM_SHA256
|
||||
*
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha1 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pkcs1_sha512 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ec_rsa_pkcs1_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_sha1 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_secp384r1_sha384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha1 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pkcs1_sha512 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 ec_rsa_pkcs1_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_sha1 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_secp384r1_sha384
|
||||
* TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 ecdsa_secp521r1_sha512
|
||||
* @run main/othervm TLSTest TLSv1.3 ecdsa_secp521r1_sha512
|
||||
* TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_rsae_sha512 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.3 rsa_pss_pss_sha512 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_rsae_sha512 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha256 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha384 TLS_AES_256_GCM_SHA384
|
||||
* @run main/othervm TLSTest TLSv1.3 rsa_pss_pss_sha512 TLS_AES_256_GCM_SHA384
|
||||
*
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pkcs1_sha256
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pkcs1_sha256
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pkcs1_sha384
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pkcs1_sha384
|
||||
* TLS_RSA_WITH_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pkcs1_sha512
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pkcs1_sha512
|
||||
* TLS_RSA_WITH_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 ec_rsa_pkcs1_sha256
|
||||
* @run main/othervm TLSTest TLSv1.2 ec_rsa_pkcs1_sha256
|
||||
* TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 ecdsa_sha1
|
||||
* @run main/othervm TLSTest TLSv1.2 ecdsa_sha1
|
||||
* TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 ecdsa_secp384r1_sha384
|
||||
* @run main/othervm TLSTest TLSv1.2 ecdsa_secp384r1_sha384
|
||||
* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 ecdsa_secp521r1_sha512
|
||||
* @run main/othervm TLSTest TLSv1.2 ecdsa_secp521r1_sha512
|
||||
* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_rsae_sha256
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_rsae_sha256
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_rsae_sha384
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_rsae_sha384
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_rsae_sha512
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_rsae_sha512
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_pss_sha256
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_pss_sha256
|
||||
* TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_pss_sha384
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_pss_sha384
|
||||
* TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.2 rsa_pss_pss_sha512
|
||||
* @run main/othervm TLSTest TLSv1.2 rsa_pss_pss_sha512
|
||||
* TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
*
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pkcs1_sha256
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pkcs1_sha256
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pkcs1_sha384
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pkcs1_sha384
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pkcs1_sha512
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pkcs1_sha512
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pss_rsae_sha256
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pss_rsae_sha256
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pss_rsae_sha384
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pss_rsae_sha384
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1.1 rsa_pss_rsae_sha512
|
||||
* @run main/othervm TLSTest TLSv1.1 rsa_pss_rsae_sha512
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
*
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pkcs1_sha256 TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pkcs1_sha384 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pkcs1_sha512 TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pss_rsae_sha256
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pkcs1_sha1 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pkcs1_sha256 TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pkcs1_sha384 TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pkcs1_sha512 TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pss_rsae_sha256
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pss_rsae_sha384
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pss_rsae_sha384
|
||||
* TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* @run main/othervm -Djavax.net.debug=ssl,handshake TLSTest TLSv1 rsa_pss_rsae_sha512
|
||||
* @run main/othervm TLSTest TLSv1 rsa_pss_rsae_sha512
|
||||
* TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
*/
|
||||
public class TLSTest {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private volatile static boolean clientRenegoReady = false;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
final String tlsProtocol = args[0];
|
||||
final KeyType keyType = KeyType.valueOf(args[1]);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,8 +24,6 @@
|
||||
/*
|
||||
* SunJSSE does not support dynamic system properties, no way to re-use
|
||||
* system properties in samevm/agentvm mode.
|
||||
* For extra debugging output, add -Djavax.net.debug=ssl:handshake into the
|
||||
* run directive below.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -74,6 +72,18 @@ import javax.net.ssl.X509KeyManager;
|
||||
import jdk.test.lib.security.SecurityUtils;
|
||||
|
||||
public class TLSWithEdDSA extends SSLSocketTemplate {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final String PASSWD = "passphrase";
|
||||
private static final String DEF_TRUST_ANCHORS = "CA_DSA_1024:CA_DSA_2048:" +
|
||||
"CA_ECDSA_SECP256R1:CA_ECDSA_SECP384R1:CA_ECDSA_SECP521R1:" +
|
||||
@ -556,6 +566,10 @@ public class TLSWithEdDSA extends SSLSocketTemplate {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
SecurityUtils.removeFromDisabledTlsAlgs("TLSv1.1", "TLSv1");
|
||||
certFac = CertificateFactory.getInstance("X.509");
|
||||
String testFormat;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,7 +65,7 @@ public class ShortRSAKey512 extends SSLContextTemplate {
|
||||
/*
|
||||
* Turn on SSL debugging?
|
||||
*/
|
||||
static boolean debug = true;
|
||||
static boolean debug = false;
|
||||
|
||||
/*
|
||||
* Define the server side of the test.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -22,8 +22,7 @@
|
||||
*/
|
||||
|
||||
// SunJSSE does not support dynamic system properties, no way to re-use
|
||||
// system properties in samevm/agentvm mode. For further debugging output
|
||||
// set the -Djavax.net.debug=ssl:handshake property on the @run lines.
|
||||
// system properties in samevm/agentvm mode.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -46,6 +45,17 @@ import java.util.*;
|
||||
|
||||
public class ClientHelloKeyShares {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
// Some TLS constants we'll use for testing
|
||||
private static final int TLS_REC_HANDSHAKE = 22;
|
||||
private static final int HELLO_EXT_SUPP_GROUPS = 10;
|
||||
@ -58,6 +68,10 @@ public class ClientHelloKeyShares {
|
||||
private static final int NG_X448 = 0x001E;
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
// Arguments to this test are an abitrary number of integer
|
||||
// values which will be the expected NamedGroup IDs in the key_share
|
||||
// extension. Expected named group assertions may also be affected
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -22,8 +22,7 @@
|
||||
*/
|
||||
|
||||
// SunJSSE does not support dynamic system properties, no way to re-use
|
||||
// system properties in samevm/agentvm mode. For further debugging output
|
||||
// set the -Djavax.net.debug=ssl:handshake property on the @run lines.
|
||||
// system properties in samevm/agentvm mode.
|
||||
|
||||
/*
|
||||
* @test
|
||||
@ -48,6 +47,16 @@ import jdk.test.lib.Utils;
|
||||
|
||||
|
||||
public class HRRKeyShares {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
// Some TLS constants we'll use for testing
|
||||
private static final int TLS_REC_HANDSHAKE = 22;
|
||||
@ -209,6 +218,11 @@ public class HRRKeyShares {
|
||||
}
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
System.out.println("Test 1: Good HRR exchange using secp384r1");
|
||||
hrrKeyShareTest(NG_SECP384R1, true);
|
||||
System.out.println();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,6 +60,17 @@ import java.util.Objects;
|
||||
|
||||
public class ClientHelloProcessing {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl:handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final ByteBuffer SERVOUTBUF =
|
||||
ByteBuffer.wrap("Server Side".getBytes());
|
||||
|
||||
@ -476,7 +487,11 @@ public class ClientHelloProcessing {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
boolean allGood = true;
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
}
|
||||
|
||||
trustMgrFac = makeTrustManagerFactory(trustFilename, passwd);
|
||||
keyMgrFac = makeKeyManagerFactory(keyFilename, passwd);
|
||||
|
||||
|
||||
@ -54,6 +54,18 @@ import java.nio.ByteBuffer;
|
||||
* produced.
|
||||
*/
|
||||
public class SSLEngineTemplate extends SSLContextTemplate {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
protected final SSLEngine clientEngine; // client Engine
|
||||
protected final ByteBuffer clientOut; // write side of clientEngine
|
||||
protected final ByteBuffer clientIn; // read side of clientEngine
|
||||
@ -139,6 +151,10 @@ public class SSLEngineTemplate extends SSLContextTemplate {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
new SSLEngineTemplate().runTest();
|
||||
}
|
||||
|
||||
|
||||
@ -58,11 +58,26 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class SSLSocketTemplate extends SSLContextTemplate {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
/*
|
||||
* ==================
|
||||
* Run the test case.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
(new SSLSocketTemplate()).run();
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,6 @@
|
||||
* @library /test/lib
|
||||
* @summary SSLEngine throws IAE during parsing of X500Principal
|
||||
* @run main/othervm TestBadDNForPeerCA
|
||||
* @run main/othervm -Djavax.net.debug=all TestBadDNForPeerCA
|
||||
*/
|
||||
|
||||
import javax.net.ssl.KeyManagerFactory;
|
||||
@ -45,6 +44,16 @@ import java.util.Base64;
|
||||
|
||||
|
||||
public class TestBadDNForPeerCA {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final String proto = "TLSv1.3";
|
||||
|
||||
@ -85,6 +94,10 @@ public class TestBadDNForPeerCA {
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
TestBadDNForPeerCA test = new TestBadDNForPeerCA();
|
||||
|
||||
try {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,7 +27,6 @@
|
||||
* @library /test/lib
|
||||
* @summary SSLEngine throws IAE during parsing of X500Principal
|
||||
* @run main/othervm TestBadDNForPeerCA12
|
||||
* @run main/othervm -Djavax.net.debug=all TestBadDNForPeerCA12
|
||||
*/
|
||||
|
||||
import javax.net.ssl.KeyManagerFactory;
|
||||
@ -45,6 +44,17 @@ import java.util.Base64;
|
||||
|
||||
public class TestBadDNForPeerCA12 {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
// Test was originally written for TLSv1.2
|
||||
private static final String proto = "TLSv1.2";
|
||||
|
||||
@ -108,6 +118,10 @@ public class TestBadDNForPeerCA12 {
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
TestBadDNForPeerCA12 test = new TestBadDNForPeerCA12();
|
||||
|
||||
try {
|
||||
|
||||
@ -52,6 +52,18 @@ import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class NoInvalidateSocketException extends SSLSocketTemplate {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,session
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final int ITERATIONS = 10;
|
||||
|
||||
// This controls how long the main thread waits before closing the socket.
|
||||
@ -73,8 +85,8 @@ public class NoInvalidateSocketException extends SSLSocketTemplate {
|
||||
private static volatile boolean finished = false;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
if (System.getProperty("javax.net.debug") == null) {
|
||||
System.setProperty("javax.net.debug", "session");
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,session");
|
||||
}
|
||||
|
||||
if (args != null && args.length >= 1) {
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* @bug 8350830
|
||||
* @summary TLS 1.2 Client session resumption having ServerNameIndication
|
||||
* @modules java.base/sun.security.tools.keytool
|
||||
* @run main/othervm -Djavax.net.debug=all ResumeClientTLS12withSNI
|
||||
* @run main/othervm ResumeClientTLS12withSNI
|
||||
*/
|
||||
|
||||
import javax.net.ssl.*;
|
||||
@ -41,6 +41,17 @@ import java.util.*;
|
||||
|
||||
public class ResumeClientTLS12withSNI {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
/*
|
||||
* Enables logging of the SSLEngine operations.
|
||||
*/
|
||||
@ -77,6 +88,11 @@ public class ResumeClientTLS12withSNI {
|
||||
* Main entry point for this test.
|
||||
*/
|
||||
public static void main(String args[]) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
Files.deleteIfExists(Path.of(keyFilename));
|
||||
|
||||
sun.security.tools.keytool.Main.main(
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@
|
||||
* @modules jdk.crypto.ec
|
||||
* @library /javax/net/ssl/templates
|
||||
* @summary Calling setWantClientAuth(true) disables anonymous suites
|
||||
* @run main/othervm -Djavax.net.debug=all AnonCipherWithWantClientAuth
|
||||
* @run main/othervm AnonCipherWithWantClientAuth
|
||||
*/
|
||||
|
||||
import java.io.InputStream;
|
||||
@ -41,10 +41,27 @@ import java.security.Security;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
public class AnonCipherWithWantClientAuth extends SSLSocketTemplate {
|
||||
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=all
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
/*
|
||||
* Run the test case.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "all");
|
||||
}
|
||||
|
||||
// reset the security property to make sure that the algorithms
|
||||
// and keys used in this test are not disabled.
|
||||
Security.setProperty("jdk.tls.disabledAlgorithms", "");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (C) 2021, 2024, Tencent. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -56,6 +56,16 @@ import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
|
||||
public class SigAlgosExtTestWithTLS12 extends SSLEngineTemplate {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl,handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final boolean CLIENT_AUTH
|
||||
= Boolean.getBoolean("test.clientAuth");
|
||||
@ -114,7 +124,9 @@ public class SigAlgosExtTestWithTLS12 extends SSLEngineTemplate {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl,handshake");
|
||||
}
|
||||
|
||||
try {
|
||||
new SigAlgosExtTestWithTLS12().run();
|
||||
|
||||
@ -38,6 +38,16 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class SigSchemePropOrdering extends AbstractCheckSignatureSchemes {
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl:handshake
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final String SIG_SCHEME_STR =
|
||||
"rsa_pkcs1_sha256,rsa_pss_rsae_sha256,rsa_pss_pss_sha256," +
|
||||
@ -48,7 +58,10 @@ public class SigSchemePropOrdering extends AbstractCheckSignatureSchemes {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl:handshake");
|
||||
}
|
||||
|
||||
System.setProperty("jdk.tls.client.SignatureSchemes", SIG_SCHEME_STR);
|
||||
System.setProperty("jdk.tls.server.SignatureSchemes", SIG_SCHEME_STR);
|
||||
new SigSchemePropOrdering().run();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,7 +28,6 @@
|
||||
* jdk.test.lib.security.CertificateBuilder
|
||||
* @bug 8046321 8339403
|
||||
* @summary OCSP Stapling for TLS
|
||||
* @run main/othervm -Djavax.net.debug=ssl:respmgr
|
||||
* java.base/sun.security.ssl.StatusResponseManagerTests
|
||||
* @run main/othervm java.base/sun.security.ssl.StatusResponseManagerTests
|
||||
*/
|
||||
|
||||
|
||||
@ -47,7 +47,17 @@ import static sun.security.ssl.CertStatusExtension.*;
|
||||
*/
|
||||
public class StatusResponseManagerTests {
|
||||
|
||||
private static final boolean debug = true;
|
||||
/*
|
||||
* Enables the JSSE system debugging system property:
|
||||
*
|
||||
* -Djavax.net.debug=ssl:respmgr
|
||||
*
|
||||
* This gives a lot of low-level information about operations underway,
|
||||
* including specific handshake messages, and might be best examined
|
||||
* after gaining some familiarity with this application.
|
||||
*/
|
||||
private static final boolean debug = false;
|
||||
|
||||
private static final boolean ocspDebug = false;
|
||||
|
||||
private static Field responseCacheField;
|
||||
@ -72,6 +82,11 @@ public class StatusResponseManagerTests {
|
||||
static X509Certificate[] chain;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
if (debug) {
|
||||
System.setProperty("javax.net.debug", "ssl:respmgr");
|
||||
}
|
||||
|
||||
responseCacheField =
|
||||
StatusResponseManager.class.getDeclaredField("responseCache");
|
||||
responseCacheField.setAccessible(true);
|
||||
|
||||
1
test/jdk/sun/security/ssl/TEST.properties
Normal file
1
test/jdk/sun/security/ssl/TEST.properties
Normal file
@ -0,0 +1 @@
|
||||
maxOutputSize=500000
|
||||
Loading…
x
Reference in New Issue
Block a user