public class BinaryCertChainValidator extends Object implements X509CertChainValidatorExt
X509CertChainValidator implementation which always fails or accepts certificates,
basing on the constructor argument. Useful for tests and insecure setups (e.g. SSL client that wants
SSL encryption but do not use SSL authentication).| Constructor and Description |
|---|
BinaryCertChainValidator(boolean acceptAll) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUpdateListener(StoreUpdateListener listener)
Registers a listener which can react to errors found during refreshing
of the trust material: trusted CAs or CRLs.
|
void |
addValidationListener(ValidationErrorListener listener)
Registers a listener which can react to errors found during certificate
validation.
|
void |
dispose()
Disposes resources used by this Validator, like threads.
|
ProxySupport |
getProxySupport()
Returns whether this validator supports proxy certificates.
|
RevocationParameters |
getRevocationCheckingMode()
Gets the current revocation checking mode.
|
X509Certificate[] |
getTrustedIssuers()
Returns a list of trusted issuers of certificates.
|
void |
removeUpdateListener(StoreUpdateListener listener)
Unregisters a previously registered CA or CRL update listener.
|
void |
removeValidationListener(ValidationErrorListener listener)
Unregisters a previously registered validation listener.
|
ValidationResult |
validate(CertPath certPath)
Performs validation of a provided certificate path.
|
ValidationResult |
validate(X509Certificate[] certChain)
Performs validation of a provided certificate chain.
|
public BinaryCertChainValidator(boolean acceptAll)
acceptAll - if true then all validations will succeed. If false all will fail.public ValidationResult validate(CertPath certPath)
validate in interface X509CertChainValidatorcertPath - to be validatedpublic ValidationResult validate(X509Certificate[] certChain)
validate in interface X509CertChainValidatorcertChain - to be validatedpublic X509Certificate[] getTrustedIssuers()
getTrustedIssuers in interface X509CertChainValidatorpublic void addValidationListener(ValidationErrorListener listener)
ValidationError, not the exception.addValidationListener in interface X509CertChainValidatorlistener - to be registeredpublic void removeValidationListener(ValidationErrorListener listener)
removeValidationListener in interface X509CertChainValidatorlistener - to be unregisteredpublic void addUpdateListener(StoreUpdateListener listener)
addUpdateListener in interface X509CertChainValidatorlistener - to be registeredpublic void removeUpdateListener(StoreUpdateListener listener)
removeUpdateListener in interface X509CertChainValidatorlistener - to be unregisteredpublic ProxySupport getProxySupport()
X509CertChainValidatorExtgetProxySupport in interface X509CertChainValidatorExtpublic RevocationParameters getRevocationCheckingMode()
X509CertChainValidatorExtgetRevocationCheckingMode in interface X509CertChainValidatorExtpublic void dispose()
X509CertChainValidatorExtdispose in interface X509CertChainValidatorExtCopyright © 2012-2014 European Middleware Initiative. All Rights Reserved.