Fix improper ordering for default certificate type field in CertificateRequest JDK-8145252-TLS13-branch
authorjnimeh
Mon, 14 May 2018 11:08:04 -0700
branchJDK-8145252-TLS13-branch
changeset 56546 f8a11b589cc5
parent 56544 ad120e0dfcfb
child 56549 989fba7dbc73
Fix improper ordering for default certificate type field in CertificateRequest Summary: Fixes the ordering in the CERT_TYPES constant for the CertificateRequest message. ECDSA will now be an advertised type when ECDSA is available in JCE.
src/java.base/share/classes/sun/security/ssl/CertificateRequest.java
--- a/src/java.base/share/classes/sun/security/ssl/CertificateRequest.java	Sun May 13 08:52:25 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/CertificateRequest.java	Mon May 14 11:08:04 2018 -0700
@@ -82,11 +82,11 @@
         ECDSA_FIXED_ECDH    ((byte)0x42, "ecdsa_fixed_ecdh");
 
         private static final byte[] CERT_TYPES =
-                JsseJce.isEcAvailable() ?  new byte[] {
+                JsseJce.isEcAvailable() ? new byte[] {
+                        ECDSA_SIGN.id,
                         RSA_SIGN.id,
                         DSS_SIGN.id
                     } :  new byte[] {
-                        ECDSA_SIGN.id,
                         RSA_SIGN.id,
                         DSS_SIGN.id
                     };