jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
changeset 41580 cc479488428c
parent 41562 1e040ccac110
child 41956 69deb06bb8f1
equal deleted inserted replaced
41579:c0fe2e6364d9 41580:cc479488428c
    58 
    58 
    59     // the known security property, jdk.tls.disabledAlgorithms
    59     // the known security property, jdk.tls.disabledAlgorithms
    60     public static final String PROPERTY_TLS_DISABLED_ALGS =
    60     public static final String PROPERTY_TLS_DISABLED_ALGS =
    61             "jdk.tls.disabledAlgorithms";
    61             "jdk.tls.disabledAlgorithms";
    62 
    62 
       
    63     // the known security property, jdk.jar.disabledAlgorithms
       
    64     public static final String PROPERTY_JAR_DISABLED_ALGS =
       
    65             "jdk.jar.disabledAlgorithms";
       
    66 
    63     private final String[] disabledAlgorithms;
    67     private final String[] disabledAlgorithms;
    64     private final Constraints algorithmConstraints;
    68     private final Constraints algorithmConstraints;
    65 
    69 
    66     /**
    70     /**
    67      * Initialize algorithm constraints with the specified security property.
    71      * Initialize algorithm constraints with the specified security property.
    71      */
    75      */
    72     public DisabledAlgorithmConstraints(String propertyName) {
    76     public DisabledAlgorithmConstraints(String propertyName) {
    73         this(propertyName, new AlgorithmDecomposer());
    77         this(propertyName, new AlgorithmDecomposer());
    74     }
    78     }
    75 
    79 
       
    80     /**
       
    81      * Initialize algorithm constraints with the specified security property
       
    82      * for a specific usage type.
       
    83      *
       
    84      * @param propertyName the security property name that define the disabled
       
    85      *        algorithm constraints
       
    86      * @param decomposer an alternate AlgorithmDecomposer.
       
    87      */
    76     public DisabledAlgorithmConstraints(String propertyName,
    88     public DisabledAlgorithmConstraints(String propertyName,
    77             AlgorithmDecomposer decomposer) {
    89             AlgorithmDecomposer decomposer) {
    78         super(decomposer);
    90         super(decomposer);
    79         disabledAlgorithms = getAlgorithms(propertyName);
    91         disabledAlgorithms = getAlgorithms(propertyName);
    80         algorithmConstraints = new Constraints(disabledAlgorithms);
    92         algorithmConstraints = new Constraints(disabledAlgorithms);