changeset 9730:8ace45049ae1

8029745: Enhance algorithm checking Summary: Intialize SIGNATURE_PRIMITIVE_SET with Collections.unmodifiableSet() Reviewed-by: mullan
author juh
date Fri, 10 Jan 2014 13:42:44 -0800
parents 665fa2fc176f
children 4f0a93285066
files src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Wed Dec 18 10:43:11 2013 +0400
+++ b/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Fri Jan 10 13:42:44 2014 -0800
@@ -75,7 +75,7 @@
     private PublicKey prevPubKey;
 
     private final static Set<CryptoPrimitive> SIGNATURE_PRIMITIVE_SET =
-                                    EnumSet.of(CryptoPrimitive.SIGNATURE);
+        Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE));
 
     private final static DisabledAlgorithmConstraints
         certPathDefaultConstraints = new DisabledAlgorithmConstraints(
--- a/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Wed Dec 18 10:43:11 2013 +0400
+++ b/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Fri Jan 10 13:42:44 2014 -0800
@@ -68,7 +68,7 @@
 
     // performance optimization
     private final static Set<CryptoPrimitive> SIGNATURE_PRIMITIVE_SET =
-                                    EnumSet.of(CryptoPrimitive.SIGNATURE);
+        Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE));
 
     // supported pairs of signature and hash algorithm
     private final static Map<Integer, SignatureAndHashAlgorithm> supportedMap;