8029745: Enhance algorithm checking

Intialize SIGNATURE_PRIMITIVE_SET with Collections.unmodifiableSet()

Reviewed-by: mullan
This commit is contained in:
Jason Uh 2014-01-10 13:42:44 -08:00
parent 3a0b9b5056
commit f87f771956
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ final public class AlgorithmChecker extends PKIXCertPathChecker {
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(

View File

@ -68,7 +68,7 @@ final class SignatureAndHashAlgorithm {
// 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;