@ThreadSafe public class X509RSAOpenSSLBlacklistValidator extends AbstractX509Validator
Validator.Action| Modifier and Type | Field and Description |
|---|---|
private Set<String> |
blacklistedValues
Set of digest values blacklisted by this validator.
|
private Resource |
blacklistResource
Resource that provides the blacklist.
|
private int |
keySize
Restrict checking to a given key size.
|
private byte[] |
openSSLprefix
Sequence of bytes put on the front of the string to be hashed.
|
| Constructor and Description |
|---|
X509RSAOpenSSLBlacklistValidator()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected void |
doInitialize() |
void |
doValidate(X509Certificate cert,
Item<?> item,
String stageId)
Apply the validator to the object in the given
Item context. |
Resource |
getBlacklistResource()
Gets the resource that provides the blacklist.
|
int |
getKeySize()
Gets the key size restriction for this blacklist.
|
private String |
openSSLDigest(BigInteger modulus)
Computes the OpenSSL digest value for the given modulus.
|
void |
setBlacklistResource(Resource resource)
Sets the resource that provides the blacklist.
|
void |
setKeySize(int size)
Sets a key size restriction for this blacklist.
|
validateaddError, addStatus, addWarningsetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedsetIdprivate final byte[] openSSLprefix
private Resource blacklistResource
private int keySize
public X509RSAOpenSSLBlacklistValidator()
@Nullable public Resource getBlacklistResource()
public void setBlacklistResource(@Nonnull Resource resource)
resource - resource that provides the blacklistpublic void setKeySize(int size)
size - restricted key size, or 0 for no restrictionpublic int getKeySize()
@Nonnull private String openSSLDigest(@Nonnull BigInteger modulus) throws StageProcessingException
modulus - RSA public modulus to be digestedStageProcessingException - if SHA1 digester can not be acquired, or for internal
errors related to ByteArrayOutputStreampublic void doValidate(@Nonnull X509Certificate cert, @Nonnull Item<?> item, @Nonnull String stageId) throws StageProcessingException
Item context.
The validator influences future processing by adding item metadata to the Item.doValidate in class AbstractX509Validatorcert - the certificate to be validateditem - the Item context for the validationstageId - the identifier for the stage that is requesting the validation, for
inclusion in status metadataStageProcessingException - if an error occurs during validationprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionCopyright © 1999–2016. All rights reserved.