Package eu.europa.esig.dss.validation
Class OCSPAndCRLRevocationSource
java.lang.Object
eu.europa.esig.dss.validation.OCSPAndCRLRevocationSource
- All Implemented Interfaces:
RevocationSource<Revocation>
,Serializable
public class OCSPAndCRLRevocationSource extends Object implements RevocationSource<Revocation>
Fetchs revocation data for a certificate by querying an OCSP server first and
then a CRL server if no OCSP response could be retrieved.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description OCSPAndCRLRevocationSource(RevocationSource<CRL> crlSource, RevocationSource<OCSP> ocspSource)
Build a OCSPAndCRLCertificateVerifier that will use the provided CRLSource and OCSPSource -
Method Summary
Modifier and Type Method Description RevocationToken<CRL>
checkCRL(CertificateToken certificateToken, CertificateToken issuerToken)
RevocationToken<OCSP>
checkOCSP(CertificateToken certificateToken, CertificateToken issuerToken)
RevocationToken<Revocation>
getRevocationToken(CertificateToken certificateToken, CertificateToken issuerToken)
This method tries firstly to collect from the OCSP Source and than from the CRL Source.
-
Constructor Details
-
OCSPAndCRLRevocationSource
public OCSPAndCRLRevocationSource(RevocationSource<CRL> crlSource, RevocationSource<OCSP> ocspSource)Build a OCSPAndCRLCertificateVerifier that will use the provided CRLSource and OCSPSource- Parameters:
crlSource
- the used CRL Source (online or offline)ocspSource
- the used OCSP Source (online or offline)
-
-
Method Details
-
getRevocationToken
public RevocationToken<Revocation> getRevocationToken(CertificateToken certificateToken, CertificateToken issuerToken)This method tries firstly to collect from the OCSP Source and than from the CRL Source. The first result is returned.- Specified by:
getRevocationToken
in interfaceRevocationSource<Revocation>
- Parameters:
certificateToken
- TheCertificateToken
for which the request is madeissuerToken
- TheCertificateToken
which is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
checkOCSP
public RevocationToken<OCSP> checkOCSP(CertificateToken certificateToken, CertificateToken issuerToken) -
checkCRL
public RevocationToken<CRL> checkCRL(CertificateToken certificateToken, CertificateToken issuerToken)
-