Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.
The "tools/SSLTest.java" page has been changed by ChristopherSchultz: https://wiki.apache.org/tomcat/tools/SSLTest.java?action=diff&rev1=2&rev2=3 Comment: Added change to enable all algorithms /** * A driver class to test a server's SSL/TLS support. - * + * * Usage: java SSLTest [opts] host[:port] - * + * * Try "java SSLTest -h" for help. - * + * * This tester will attempts to handshake with the target host with all * available protocols and ciphers and report which ones were accepted and * which were rejected. An HTTP connection is never fully made, so these * connections should not flood the host's access log with entries. - * + * * @author Christopher Schultz */ public class SSLTest @@ -148, +148 @@ System.exit(1); } } - + if(argIndex >= args.length) { System.err.println("Unexpected additional arguments: " @@ -172, +172 @@ if(null == trustStoreType) trustStoreType = "JKS"; - trustManagers = SSLUtils.getTrustManagers(trustStoreFilename, trustStorePassword, trustStoreType, trustStoreProvider, trustStoreAlgorithm, null, crlFilename); + trustManagers = SSLUtils.getTrustManagers(trustStoreFilename, trustStorePassword, trustStoreType, trustStoreProvider, trustStoreAlgorithm, null, crlFilename); } else trustManagers = null; @@ -186, +186 @@ port = Integer.parseInt(host.substring(pos + 1)); host = host.substring(0, pos); } - + System.out.println("Testing server " + host + ":" + port); + + // Enable *all* algorithms + Security.setProperty("jdk.tls.disabledAlgorithms", ""); SecureRandom rand = new SecureRandom(); @@ -335, +338 @@ System.out.print(socket.getSession().getProtocol()); System.out.print(", cipher="); System.out.println(socket.getSession().getCipherSuite()); - + if(showCerts) { for(Certificate cert : socket.getSession().getPeerCertificates()) @@ -368, +371 @@ static String toHexString(byte[] bytes) { StringBuilder sb = new StringBuilder(bytes.length * 2); - + for(byte b : bytes) sb.append(hexChars[(b >> 4) & 0x0f]) .append(hexChars[b & 0x0f]); - + return sb.toString(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org