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:
Sibabrata Sahoo 2019-12-16 00:23:50 -08:00
parent abac8b17a9
commit fca342f736
2 changed files with 1 additions and 2 deletions

View file

@ -373,7 +373,7 @@ public abstract class SSLContextImpl extends SSLContextSpi {
private static List<CipherSuite> getApplicableCipherSuites(
Collection<CipherSuite> allowedCipherSuites,
List<ProtocolVersion> protocols) {
TreeSet<CipherSuite> suites = new TreeSet<>();
LinkedHashSet<CipherSuite> suites = new LinkedHashSet<>();
if (protocols != null && (!protocols.isEmpty())) {
for (CipherSuite suite : allowedCipherSuites) {
if (!suite.isAvailable()) {