Package net.shibboleth.tool.xmlsectool
Class DisallowedAlgorithms
- java.lang.Object
-
- net.shibboleth.tool.xmlsectool.DisallowedAlgorithms
-
public class DisallowedAlgorithms extends Object
A collection of insecure or otherwise undesirable digest algorithms and signature algorithms, to be used to prevent their use in the validation of digital signatures.
-
-
Field Summary
Fields Modifier and Type Field Description private Set<String>digestAlgorithmsOrdered set of disallowed digest algorithm URIs.private Set<String>signatureAlgorithmsOrdered set of disallowed signature algorithm URIs.
-
Constructor Summary
Constructors Constructor Description DisallowedAlgorithms()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallowAllDigests()Empties the disallowed digest and signature algorithm lists.voidallowDigest(DigestChoice digestChoice)Remove the digest and signature algorithms associated with aDigestChoice.voiddisallowDigest(DigestChoice digestChoice)Add the digest and signature algorithms associated with aDigestChoice.booleanisDigestAlgorithmDisallowed(String alg)Returnstrueif the indicated algorithm URI is disallowed for use as a digest algorithm.booleanisSignatureAlgorithmDisallowed(String alg)Returnstrueif the indicated algorithm URI is disallowed for use as a signature algorithm.voidlist(PrintStream out)List out the contents of the algorithm collections.
-
-
-
Method Detail
-
disallowDigest
public void disallowDigest(DigestChoice digestChoice)
Add the digest and signature algorithms associated with aDigestChoice.- Parameters:
digestChoice-DigestChoiceto add
-
allowDigest
public void allowDigest(DigestChoice digestChoice)
Remove the digest and signature algorithms associated with aDigestChoice.- Parameters:
digestChoice-DigestChoiceto remove
-
isDigestAlgorithmDisallowed
public boolean isDigestAlgorithmDisallowed(String alg)
Returnstrueif the indicated algorithm URI is disallowed for use as a digest algorithm.- Parameters:
alg- digest algorithm URI to check- Returns:
trueif the algorithm is disallowed
-
isSignatureAlgorithmDisallowed
public boolean isSignatureAlgorithmDisallowed(String alg)
Returnstrueif the indicated algorithm URI is disallowed for use as a signature algorithm.- Parameters:
alg- signature algorithm URI to check- Returns:
trueif the algorithm is disallowed
-
allowAllDigests
public void allowAllDigests()
Empties the disallowed digest and signature algorithm lists.
-
list
public void list(PrintStream out)
List out the contents of the algorithm collections.- Parameters:
out- stream to send the listing to
-
-