--- old/test/jdk/javax/net/ssl/compatibility/JdkInfo.java 2019-01-17 15:19:25.000000000 +0800 +++ new/test/jdk/javax/net/ssl/compatibility/JdkInfo.java 2019-01-17 15:19:24.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, 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 @@ -31,7 +31,8 @@ public final String jdkPath; public final String version; - public final boolean supportsECKey; + public final String supportedProtocols; + public final String supportedCipherSuites; public final boolean supportsSNI; public final boolean supportsALPN; @@ -46,9 +47,10 @@ String[] attributes = Utils.split(output, Utils.PARAM_DELIMITER); version = attributes[0].replaceAll(".*=", ""); - supportsECKey = Boolean.valueOf(attributes[1].replaceAll(".*=", "")); - supportsSNI = Boolean.valueOf(attributes[2].replaceAll(".*=", "")); - supportsALPN = Boolean.valueOf(attributes[3].replaceAll(".*=", "")); + supportedProtocols = attributes[1].replaceAll(".*=", ""); + supportedCipherSuites = attributes[2].replaceAll(".*=", ""); + supportsSNI = Boolean.valueOf(attributes[3].replaceAll(".*=", "")); + supportsALPN = Boolean.valueOf(attributes[4].replaceAll(".*=", "")); } // Determines the specific attributes for the specified JDK. @@ -83,10 +85,11 @@ return true; } + public boolean supportsProtocol(Protocol protocol) { + return supportedProtocols.contains(protocol.name); + } + public boolean supportsCipherSuite(CipherSuite cipherSuite) { - JdkRelease jdkRelease = JdkRelease.getRelease(version); - return cipherSuite.startJdk.sequence <= jdkRelease.sequence - && (cipherSuite.endJdk == null - || cipherSuite.endJdk.sequence >= jdkRelease.sequence); + return supportedCipherSuites.contains(cipherSuite.name()); } }