Class OfflineOCSPSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource
- All Implemented Interfaces:
OCSPSource
,RevocationSource<OCSPToken>
,Serializable
- Direct Known Subclasses:
ExternalResourcesOCSPSource
,SignatureOCSPSource
public abstract class OfflineOCSPSource extends Object implements OCSPSource
Abstract class that helps to implement an OCSPSource with an already loaded list of BasicOCSPResp
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description OfflineOCSPSource()
-
Method Summary
Modifier and Type Method Description protected void
addOCSPResponse(OCSPResponseBinary ocspResponse, RevocationOrigin origin)
Adds the providedocspResponse
to the listabstract void
appendContainedOCSPResponses()
Retrieves the map ofBasicOCSPResp
/RevocationOrigin
contained in the source and appends result entries toocspResponses
.OCSPResponseBinary
getIdentifier(Digest digest)
Returns the identifier related for the provideddigest
of referenceOCSPResponseBinary
getIdentifier(OCSPRef ocspRef)
Returns the identifier related for the providedocspRef
Collection<OCSPResponseBinary>
getOCSPResponsesList()
Returns a collection containing all OCSP responsesSet<RevocationOrigin>
getRevocationOrigins(OCSPResponseBinary ocspResponse)
Returns a set ofRevocationOrigin
s for the givenocspResponse
OCSPToken
getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)
This method retrieves aRevocationToken
for the certificateTokenboolean
isEmpty()
Checks if the OCSP Source is empty or not (ocspResponseOriginsMap)protected void
storeOCSPToken(OCSPResponseBinary ocspResponse, OCSPToken ocspToken)
-
Constructor Details
-
OfflineOCSPSource
public OfflineOCSPSource()
-
-
Method Details
-
getRevocationToken
public final OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)Description copied from interface:RevocationSource
This method retrieves aRevocationToken
for the certificateToken- Specified by:
getRevocationToken
in interfaceRevocationSource<OCSPToken>
- Parameters:
certificateToken
- TheCertificateToken
for which the request is madeissuerCertificateToken
- TheCertificateToken
which is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
appendContainedOCSPResponses
public abstract void appendContainedOCSPResponses()Retrieves the map ofBasicOCSPResp
/RevocationOrigin
contained in the source and appends result entries toocspResponses
. -
getOCSPResponsesList
Returns a collection containing all OCSP responses- Returns:
- unmodifiable collection of
OCSPResponse
s
-
isEmpty
public boolean isEmpty()Checks if the OCSP Source is empty or not (ocspResponseOriginsMap)- Returns:
- TRUE if the source is empty, FALSE otherwise
-
storeOCSPToken
-
getIdentifier
Returns the identifier related for the providedocspRef
- Parameters:
ocspRef
-OCSPRef
to find identifier for- Returns:
OCSPResponseBinary
for the reference
-
getIdentifier
Returns the identifier related for the provideddigest
of reference- Parameters:
digest
-Digest
of the reference- Returns:
OCSPResponseBinary
for the reference
-
addOCSPResponse
Adds the providedocspResponse
to the list- Parameters:
ocspResponse
-OCSPResponseBinary
to addorigin
-RevocationOrigin
of theocspResponse
-
getRevocationOrigins
Returns a set ofRevocationOrigin
s for the givenocspResponse
- Parameters:
ocspResponse
-OCSPResponseBinary
to get origins for- Returns:
- set of
RevocationOrigin
s
-