# HG changeset patch # User juh # Date 1389390164 28800 # Node ID 911b1eb93667f47a93b6e35fbcc191c6fcb8c097 # Parent 0b88142bbc7e0c49762683376b8a4074c9064877 8029745: Enhance algorithm checking Summary: Intialize SIGNATURE_PRIMITIVE_SET with Collections.unmodifiableSet() Reviewed-by: mullan diff -r 0b88142bbc7e -r 911b1eb93667 jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java --- a/jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java Wed Dec 18 10:43:11 2013 +0400 +++ b/jdk/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 SIGNATURE_PRIMITIVE_SET = - EnumSet.of(CryptoPrimitive.SIGNATURE); + Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); private final static DisabledAlgorithmConstraints certPathDefaultConstraints = new DisabledAlgorithmConstraints( diff -r 0b88142bbc7e -r 911b1eb93667 jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java --- a/jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Wed Dec 18 10:43:11 2013 +0400 +++ b/jdk/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 SIGNATURE_PRIMITIVE_SET = - EnumSet.of(CryptoPrimitive.SIGNATURE); + Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE)); // supported pairs of signature and hash algorithm private final static Map supportedMap;