public class BCCertPathValidator extends Object
PKIXCertPathReviewer
with additional support for proxy certificates.Modifier and Type | Field and Description |
---|---|
static long |
PROXY_VALIDATION_GRACE_PERIOD |
Constructor and Description |
---|
BCCertPathValidator() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLastCNNameRule(X500Principal srcP,
X500Principal issuerP,
List<ValidationError> errors,
int position,
X509Certificate[] proxyChain) |
protected List<X509Certificate> |
checkNonProxyChain(X509Certificate[] baseChain,
ExtPKIXParameters2 params,
List<ValidationError> errors,
Set<String> unresolvedExtensions,
int posDelta,
X509Certificate[] cc)
Performs checking of the chain which has no proxies (or at least should not have proxies),
using
FixedBCPKIXCertPathReviewer . |
protected void |
checkPairWithProxy(X509Certificate issuerCert,
X509Certificate proxyCert,
List<ValidationError> errors,
int position,
X509Certificate[] proxyChain,
Date validationTime)
Checks if the certificate passed as the 2nd argument is a correct proxy
certificate including checks w.r.t. chain rules with the certificate passed
as the 1st argument being its issuing certificate.
|
protected void |
checkProxyChainMain(X509Certificate[] proxyChain,
List<ValidationError> errors,
Set<String> unresolvedExtensions,
Date validDate)
Performs a validation loop of the proxy chain checking each pair in chain
for the rules not otherwise verified by the base check.
|
protected void |
checkProxyChainWithBC(X509Certificate[] proxyChain,
Set<TrustAnchor> trustAnchor,
List<ValidationError> errors,
Set<String> unresolvedExtensions)
Checks chain with proxies, starting with the EEC using X.509 path validation.
|
protected void |
checkProxyTime(X509Certificate proxyCert,
Date validationTime,
X509Certificate[] proxyChain,
List<ValidationError> errors,
int position) |
protected List<ValidationError> |
convertErrors(List<?>[] bcErrorsA,
boolean ignoreProxyErrors,
int positionDelta,
X509Certificate[] cc) |
protected ExtPKIXParameters2 |
createPKIXParameters(X509Certificate[] toCheck,
boolean proxySupport,
Set<TrustAnchor> trustAnchors,
CertStore crlStore,
RevocationParameters revocationParams,
ObserversHandler observersHandler) |
protected int |
getFirstProxy(X509Certificate[] toCheck) |
protected Set<String> |
getUnresolvedExtensionons(List<?>[] bcErrorsA) |
ValidationResult |
validate(X509Certificate[] toCheck,
boolean proxySupport,
Set<TrustAnchor> trustAnchors,
CertStore crlStore,
RevocationParameters revocationParams,
ObserversHandler observersHandler)
Performs validation.
|
public static final long PROXY_VALIDATION_GRACE_PERIOD
public ValidationResult validate(X509Certificate[] toCheck, boolean proxySupport, Set<TrustAnchor> trustAnchors, CertStore crlStore, RevocationParameters revocationParams, ObserversHandler observersHandler) throws CertificateException
If the proxy support is turned off or the chain has no proxy certificate then normal X.509 path validation is performed (see below).
If the proxy support is turned on and the chain has at least one proxy then the following checks are performed:
The normal path validation is performed as follows:
toCheck
- chain to checkproxySupport
- proxy supporttrustAnchors
- trust anchorscrlStore
- crl storerevocationParams
- revocation paramsobserversHandler
- observers handlerCertificateException
- if some of the certificates in the chain can not
be parsedprotected ExtPKIXParameters2 createPKIXParameters(X509Certificate[] toCheck, boolean proxySupport, Set<TrustAnchor> trustAnchors, CertStore crlStore, RevocationParameters revocationParams, ObserversHandler observersHandler)
protected int getFirstProxy(X509Certificate[] toCheck)
protected List<X509Certificate> checkNonProxyChain(X509Certificate[] baseChain, ExtPKIXParameters2 params, List<ValidationError> errors, Set<String> unresolvedExtensions, int posDelta, X509Certificate[] cc) throws CertificateException
FixedBCPKIXCertPathReviewer
. In future, when BC implementation is fixed
it should use PKIXCertPathReviewer
instead.baseChain
- base chainparams
- parameterserrors
- errorsunresolvedExtensions
- unresolved extensionsposDelta
- position deltacc
- certificate chainCertificateException
- certificate exceptionprotected void checkProxyChainWithBC(X509Certificate[] proxyChain, Set<TrustAnchor> trustAnchor, List<ValidationError> errors, Set<String> unresolvedExtensions) throws CertificateException
proxyChain
- proxy chaintrustAnchor
- trust anchorerrors
- errorsunresolvedExtensions
- unresolved extensionsCertificateException
- certificate exceptionprotected void checkProxyChainMain(X509Certificate[] proxyChain, List<ValidationError> errors, Set<String> unresolvedExtensions, Date validDate) throws CertificateException
proxyChain
- proxy chainerrors
- errorsunresolvedExtensions
- unresolved extensionsvalidDate
- valid dateCertificateException
- certificate exceptionprotected void checkPairWithProxy(X509Certificate issuerCert, X509Certificate proxyCert, List<ValidationError> errors, int position, X509Certificate[] proxyChain, Date validationTime) throws CertPathValidatorException, CertificateParsingException
issuerCert
- certificate of the issuerproxyCert
- certificate to be checkederrors
- out arg - list of errors foundposition
- position in original chain to be used in error reportingproxyChain
- proxy chainvalidationTime
- validation timeCertPathValidatorException
- certificate path validator exceptionCertificateParsingException
- certificate parsing exceptionprotected void checkProxyTime(X509Certificate proxyCert, Date validationTime, X509Certificate[] proxyChain, List<ValidationError> errors, int position)
protected void checkLastCNNameRule(X500Principal srcP, X500Principal issuerP, List<ValidationError> errors, int position, X509Certificate[] proxyChain) throws CertPathValidatorException
CertPathValidatorException
protected List<ValidationError> convertErrors(List<?>[] bcErrorsA, boolean ignoreProxyErrors, int positionDelta, X509Certificate[] cc)
Copyright © 2012-2017 European Middleware Initiative. All Rights Reserved.