edu.internet2.middleware.security
Class XmlSecToolCommandLineArguments.Blacklist

java.lang.Object
  extended by edu.internet2.middleware.security.XmlSecToolCommandLineArguments.Blacklist
Enclosing class:
XmlSecToolCommandLineArguments

public class XmlSecToolCommandLineArguments.Blacklist
extends Object

A blacklist of digest and signature algorithms we should not accept during signature verification.


Field Summary
private  Set<String> digestBlacklist
          Ordered set of blacklisted digest algorithm URIs.
private  Set<String> signatureBlacklist
          Ordered set of blacklisted signature algorithm URIs.
 
Constructor Summary
XmlSecToolCommandLineArguments.Blacklist()
          Constructor.
 
Method Summary
 void addDigest(XmlSecToolCommandLineArguments.DigestChoice digestChoice)
          Blacklist the digest and signature algorithms associated with a XmlSecToolCommandLineArguments.DigestChoice.
private  void addDigestAlgorithm(String uri)
          Blacklist an individual digest algorithm.
private  void addSignatureAlgorithm(String uri)
          Blacklist an individual signature algorithm.
 void clear()
          Empties the digest and signature blacklists.
 Collection<String> getDigestBlacklist()
          Returns an unmodifiable view on the set of blacklisted digest algorithms.
 Collection<String> getSignatureBlacklist()
          Returns an unmodifiable view on the set of blacklisted signature algorithms.
 boolean isBlacklistedDigest(String alg)
          Returns true if the indicated algorithm URI is blacklisted for use as a digest algorithm.
 boolean isBlacklistedSignature(String alg)
          Returns true if the indicated algorithm URI is blacklisted for use as a signature algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

digestBlacklist

private final Set<String> digestBlacklist
Ordered set of blacklisted digest algorithm URIs.


signatureBlacklist

private final Set<String> signatureBlacklist
Ordered set of blacklisted signature algorithm URIs.

Constructor Detail

XmlSecToolCommandLineArguments.Blacklist

public XmlSecToolCommandLineArguments.Blacklist()
Constructor. Initializes the blacklist with those algorithms that should be blacklisted by default.

Method Detail

addDigestAlgorithm

private void addDigestAlgorithm(String uri)
Blacklist an individual digest algorithm.

Parameters:
uri - algorithm URI to blacklist

addSignatureAlgorithm

private void addSignatureAlgorithm(String uri)
Blacklist an individual signature algorithm.

Parameters:
uri - algorithm URI to blacklist

addDigest

public void addDigest(XmlSecToolCommandLineArguments.DigestChoice digestChoice)
Blacklist the digest and signature algorithms associated with a XmlSecToolCommandLineArguments.DigestChoice.

Parameters:
digestChoice - XmlSecToolCommandLineArguments.DigestChoice to add to blacklist

isBlacklistedDigest

public boolean isBlacklistedDigest(String alg)
Returns true if the indicated algorithm URI is blacklisted for use as a digest algorithm.

Parameters:
alg - digest algorithm URI to check
Returns:
true if the algorithm is blacklisted

isBlacklistedSignature

public boolean isBlacklistedSignature(String alg)
Returns true if the indicated algorithm URI is blacklisted for use as a signature algorithm.

Parameters:
alg - signature algorithm URI to check
Returns:
true if the algorithm is blacklisted

getDigestBlacklist

public Collection<String> getDigestBlacklist()
Returns an unmodifiable view on the set of blacklisted digest algorithms.

Returns:
set of blacklisted algorithms

getSignatureBlacklist

public Collection<String> getSignatureBlacklist()
Returns an unmodifiable view on the set of blacklisted signature algorithms.

Returns:
set of blacklisted algorithms

clear

public void clear()
Empties the digest and signature blacklists.



Copyright © 1999-2013. All Rights Reserved.