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.
--- 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
};