8235874: The ordering of Cipher Suites is not maintained provided through jdk.tls.client.cipherSuites and jdk.tls.server.cipherSuites system property
Corrected Cipher Suites ordering through system properties Reviewed-by: xuelei
This commit is contained in:
parent
abac8b17a9
commit
fca342f736
@ -373,7 +373,7 @@ public abstract class SSLContextImpl extends SSLContextSpi {
|
|||||||
private static List<CipherSuite> getApplicableCipherSuites(
|
private static List<CipherSuite> getApplicableCipherSuites(
|
||||||
Collection<CipherSuite> allowedCipherSuites,
|
Collection<CipherSuite> allowedCipherSuites,
|
||||||
List<ProtocolVersion> protocols) {
|
List<ProtocolVersion> protocols) {
|
||||||
TreeSet<CipherSuite> suites = new TreeSet<>();
|
LinkedHashSet<CipherSuite> suites = new LinkedHashSet<>();
|
||||||
if (protocols != null && (!protocols.isEmpty())) {
|
if (protocols != null && (!protocols.isEmpty())) {
|
||||||
for (CipherSuite suite : allowedCipherSuites) {
|
for (CipherSuite suite : allowedCipherSuites) {
|
||||||
if (!suite.isAvailable()) {
|
if (!suite.isAvailable()) {
|
||||||
|
@ -30,7 +30,6 @@ import javax.net.ssl.SSLSocket;
|
|||||||
* @library /javax/net/ssl/templates
|
* @library /javax/net/ssl/templates
|
||||||
* /javax/net/ssl/TLSCommon
|
* /javax/net/ssl/TLSCommon
|
||||||
* @summary Test TLS ciphersuites order set through System properties
|
* @summary Test TLS ciphersuites order set through System properties
|
||||||
* @ignore Not applicable until the cipher order of system property maintained.
|
|
||||||
* @run main/othervm
|
* @run main/othervm
|
||||||
* -Djdk.tls.client.cipherSuites=TLS_CHACHA20_POLY1305_SHA256,TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384
|
* -Djdk.tls.client.cipherSuites=TLS_CHACHA20_POLY1305_SHA256,TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384
|
||||||
* -Djdk.tls.server.cipherSuites=TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_AES_128_GCM_SHA256
|
* -Djdk.tls.server.cipherSuites=TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_AES_128_GCM_SHA256
|
||||||
|
Loading…
x
Reference in New Issue
Block a user