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 voidaddOCSPResponse(OCSPResponseBinary ocspResponse, RevocationOrigin origin)Adds the providedocspResponseto the listabstract voidappendContainedOCSPResponses()Retrieves the map ofBasicOCSPResp/RevocationOrigincontained in the source and appends result entries toocspResponses.OCSPResponseBinarygetIdentifier(Digest digest)Returns the identifier related for the provideddigestof referenceOCSPResponseBinarygetIdentifier(OCSPRef ocspRef)Returns the identifier related for the providedocspRefCollection<OCSPResponseBinary>getOCSPResponsesList()Returns a collection containing all OCSP responsesSet<RevocationOrigin>getRevocationOrigins(OCSPResponseBinary ocspResponse)Returns a set ofRevocationOrigins for the givenocspResponseOCSPTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)This method retrieves aRevocationTokenfor the certificateTokenbooleanisEmpty()Checks if the OCSP Source is empty or not (ocspResponseOriginsMap)protected voidstoreOCSPToken(OCSPResponseBinary ocspResponse, OCSPToken ocspToken)
-
-
-
Method Detail
-
getRevocationToken
public final OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)
Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceRevocationSource<OCSPToken>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
appendContainedOCSPResponses
public abstract void appendContainedOCSPResponses()
Retrieves the map ofBasicOCSPResp/RevocationOrigincontained in the source and appends result entries toocspResponses.
-
getOCSPResponsesList
public Collection<OCSPResponseBinary> getOCSPResponsesList()
Returns a collection containing all OCSP responses- Returns:
- unmodifiable collection of
OCSPResponses
-
isEmpty
public boolean isEmpty()
Checks if the OCSP Source is empty or not (ocspResponseOriginsMap)- Returns:
- TRUE if the source is empty, FALSE otherwise
-
storeOCSPToken
protected void storeOCSPToken(OCSPResponseBinary ocspResponse, OCSPToken ocspToken)
-
getIdentifier
public OCSPResponseBinary getIdentifier(OCSPRef ocspRef)
Returns the identifier related for the providedocspRef- Parameters:
ocspRef-OCSPRefto find identifier for- Returns:
OCSPResponseBinaryfor the reference
-
getIdentifier
public OCSPResponseBinary getIdentifier(Digest digest)
Returns the identifier related for the provideddigestof reference- Parameters:
digest-Digestof the reference- Returns:
OCSPResponseBinaryfor the reference
-
addOCSPResponse
protected void addOCSPResponse(OCSPResponseBinary ocspResponse, RevocationOrigin origin)
Adds the providedocspResponseto the list- Parameters:
ocspResponse-OCSPResponseBinaryto addorigin-RevocationOriginof theocspResponse
-
getRevocationOrigins
public Set<RevocationOrigin> getRevocationOrigins(OCSPResponseBinary ocspResponse)
Returns a set ofRevocationOrigins for the givenocspResponse- Parameters:
ocspResponse-OCSPResponseBinaryto get origins for- Returns:
- set of
RevocationOrigins
-
-