changeset 11392:c1e0c10972f4

8064330: Remove SHA224 from the default support list if SunMSCAPI enabled Reviewed-by: xuelei
author robm
date Thu, 21 Jan 2016 19:21:34 +0000
parents ba5ab9bca4c5
children aa351c5dc9a2
files src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Thu Jan 21 17:55:25 2016 +0300
+++ b/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Thu Jan 21 19:21:34 2016 +0000
@@ -28,6 +28,7 @@
 import java.security.AlgorithmConstraints;
 import java.security.CryptoPrimitive;
 import java.security.PrivateKey;
+import java.security.Security;
 
 import java.util.Set;
 import java.util.HashSet;
@@ -413,10 +414,14 @@
                     "SHA1withRSA",          --p);
             supports(HashAlgorithm.SHA1,        SignatureAlgorithm.ECDSA,
                     "SHA1withECDSA",        --p);
-            supports(HashAlgorithm.SHA224,      SignatureAlgorithm.RSA,
-                    "SHA224withRSA",        --p);
-            supports(HashAlgorithm.SHA224,      SignatureAlgorithm.ECDSA,
-                    "SHA224withECDSA",      --p);
+
+            if (Security.getProvider("SunMSCAPI") == null) {
+                supports(HashAlgorithm.SHA224,      SignatureAlgorithm.RSA,
+                        "SHA224withRSA",        --p);
+                supports(HashAlgorithm.SHA224,      SignatureAlgorithm.ECDSA,
+                        "SHA224withECDSA",      --p);
+            }
+
             supports(HashAlgorithm.SHA256,      SignatureAlgorithm.RSA,
                     "SHA256withRSA",        --p);
             supports(HashAlgorithm.SHA256,      SignatureAlgorithm.ECDSA,