< prev index next >
src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
Print this page
rev 1547 : 8155973: Tighten jar checks
Reviewed-by: mullan, igerasim, ahgross
@@ -57,10 +57,14 @@
private static Map<String, String[]> disabledAlgorithmsMap =
Collections.synchronizedMap(new HashMap<String, String[]>());
private static Map<String, KeySizeConstraints> keySizeConstraintsMap =
Collections.synchronizedMap(new HashMap<String, KeySizeConstraints>());
+ // the known security property, jdk.jar.disabledAlgorithms
+ public static final String PROPERTY_JAR_DISABLED_ALGS =
+ "jdk.jar.disabledAlgorithms";
+
private final String[] disabledAlgorithms;
private final KeySizeConstraints keySizeConstraints;
/**
* Initialize algorithm constraints with the specified security property.
@@ -70,10 +74,18 @@
*/
public DisabledAlgorithmConstraints(String propertyName) {
this(propertyName, new AlgorithmDecomposer());
}
+ /**
+ * Initialize algorithm constraints with the specified security property
+ * for a specific usage type.
+ *
+ * @param propertyName the security property name that define the disabled
+ * algorithm constraints
+ * @param decomposer an alternate AlgorithmDecomposer.
+ */
public DisabledAlgorithmConstraints(String propertyName,
AlgorithmDecomposer decomposer) {
super(decomposer);
disabledAlgorithms = getAlgorithms(disabledAlgorithmsMap, propertyName);
keySizeConstraints = getKeySizeConstraints(disabledAlgorithms,
< prev index next >