public class Blacklist extends Object
| Modifier and Type | Field and Description |
|---|---|
private Set<String> |
digestBlacklist
Ordered set of blacklisted digest algorithm URIs.
|
private Set<String> |
signatureBlacklist
Ordered set of blacklisted signature algorithm URIs.
|
| Constructor and Description |
|---|
Blacklist()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDigest(DigestChoice digestChoice)
Blacklist the digest and signature algorithms associated with
a
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. |
void |
list(PrintStream out)
List out the contents of the blacklist.
|
void |
removeDigest(DigestChoice digestChoice)
Whitelist the digest and signature algorithms associated with
a
DigestChoice. |
private void |
removeDigestAlgorithm(String uri)
Whitelist an individual digest algorithm.
|
private void |
removeSignatureAlgorithm(String uri)
Whitelist an individual signature algorithm.
|
private final Set<String> digestBlacklist
public Blacklist()
private void addDigestAlgorithm(String uri)
uri - algorithm URI to blacklistprivate void removeDigestAlgorithm(String uri)
uri - algorithm URI to whitelistprivate void addSignatureAlgorithm(String uri)
uri - algorithm URI to blacklistprivate void removeSignatureAlgorithm(String uri)
uri - algorithm URI to whitelistpublic void addDigest(DigestChoice digestChoice)
DigestChoice.digestChoice - DigestChoice to add to blacklistpublic void removeDigest(DigestChoice digestChoice)
DigestChoice.digestChoice - DigestChoice to remove from blacklistpublic boolean isBlacklistedDigest(String alg)
true if the indicated algorithm URI is blacklisted for
use as a digest algorithm.alg - digest algorithm URI to checktrue if the algorithm is blacklistedpublic boolean isBlacklistedSignature(String alg)
true if the indicated algorithm URI is blacklisted for
use as a signature algorithm.alg - signature algorithm URI to checktrue if the algorithm is blacklistedpublic Collection<String> getDigestBlacklist()
public Collection<String> getSignatureBlacklist()
public void clear()
public void list(PrintStream out)
out - stream to send the listing toCopyright © 2011–2016. All rights reserved.