Class OCSPToken
java.lang.Object
eu.europa.esig.dss.model.x509.Token
eu.europa.esig.dss.spi.x509.revocation.RevocationToken<OCSP>
eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken
- All Implemented Interfaces:
IdentifierBasedObject,Serializable
OCSP Signed Token which encapsulate BasicOCSPResp (BC).
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.RevocationToken
archiveCutOff, certHashMatch, certHashPresent, expiredCertsOnCRL, externalOrigin, nextUpdate, productionDate, reason, relatedCertificate, revocationDate, sourceURL, status, thisUpdateFields inherited from class eu.europa.esig.dss.model.x509.Token
publicKeyOfTheSigner, signatureAlgorithm, signatureInvalidityReason, signatureValidity -
Constructor Summary
ConstructorsConstructorDescriptionOCSPToken(org.bouncycastle.cert.ocsp.BasicOCSPResp basicOCSPResp, org.bouncycastle.cert.ocsp.SingleResp latestSingleResp, CertificateToken certificate, CertificateToken issuer) The default constructor to instantiate an OCSPToken with BasicOCSPResp only -
Method Summary
Modifier and TypeMethodDescriptionprotected eu.europa.esig.dss.enumerations.SignatureValiditycheckIsSignedBy(PublicKey publicKey) Verifies if the current OCSP token has been signed by the specified publicKeyorg.bouncycastle.cert.ocsp.BasicOCSPRespReturns theBasicOCSPRespReturns a source of embedded into a revocation token certificatesbyte[]Returns issuerCertificateTokenorg.bouncycastle.cert.ocsp.SingleRespReturns the latest single responseintThis method returns version defined within the OCSP token (returns version value + 1, i.e.eu.europa.esig.dss.enumerations.RevocationTypeReturns the Revocation Token type (CRL or OCSP)eu.europa.esig.dss.enumerations.SignatureAlgorithmbooleanisValid()Indicates if the OCSP token is valid.Methods inherited from class eu.europa.esig.dss.spi.x509.revocation.RevocationToken
buildTokenIdentifier, equals, getArchiveCutOff, getCreationDate, getExpiredCertsOnCRL, getExternalOrigin, getNextUpdate, getProductionDate, getReason, getRelatedCertificate, getRelatedCertificateId, getRevocationDate, getSourceURL, getStatus, getThisUpdate, hashCode, isCertHashMatch, isCertHashPresent, isInternal, setExternalOrigin, setSourceURLMethods inherited from class eu.europa.esig.dss.model.x509.Token
getDigest, getDSSId, getDSSIdAsString, getInvalidityReason, getPublicKeyOfTheSigner, getSignatureValidity, isSelfSigned, isSignatureIntact, isSignedBy, isSignedBy, toString
-
Constructor Details
-
OCSPToken
public OCSPToken(org.bouncycastle.cert.ocsp.BasicOCSPResp basicOCSPResp, org.bouncycastle.cert.ocsp.SingleResp latestSingleResp, CertificateToken certificate, CertificateToken issuer) The default constructor to instantiate an OCSPToken with BasicOCSPResp only- Parameters:
basicOCSPResp-BasicOCSPRespcontaining the response binarieslatestSingleResp-SingleRespto be used with the current certificatecertificate-CertificateTokento which the revocation data is provided forissuer-CertificateTokenissued thecertificateToken
-
-
Method Details
-
getSignatureAlgorithm
public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm()- Overrides:
getSignatureAlgorithmin classToken
-
getBasicOCSPResp
public org.bouncycastle.cert.ocsp.BasicOCSPResp getBasicOCSPResp()Returns theBasicOCSPResp- Returns:
BasicOCSPResp
-
getLatestSingleResp
public org.bouncycastle.cert.ocsp.SingleResp getLatestSingleResp()Returns the latest single response- Returns:
SingleResp
-
getCertificateSource
Description copied from class:RevocationTokenReturns a source of embedded into a revocation token certificates- Specified by:
getCertificateSourcein classRevocationToken<OCSP>- Returns:
RevocationCertificateSource
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin classToken
-
getIssuerX500Principal
- Specified by:
getIssuerX500Principalin classToken
-
getIssuerCertificateToken
Description copied from class:RevocationTokenReturns issuerCertificateToken- Specified by:
getIssuerCertificateTokenin classRevocationToken<OCSP>- Returns:
- issuer
CertificateToken
-
isValid
public boolean isValid()Indicates if the OCSP token is valid. NOTE: The method isSignedBy(token) must be called before! -
checkIsSignedBy
Verifies if the current OCSP token has been signed by the specified publicKey- Specified by:
checkIsSignedByin classToken- Parameters:
publicKey-PublicKeyof a signing candidate- Returns:
SignatureValidity
-
getOCSPTokenVersion
public int getOCSPTokenVersion()This method returns version defined within the OCSP token (returns version value + 1, i.e. 'v1' for value '0'). Returns '1' if no version defined (default value).- Returns:
- version from the basic OCSP response
-
getRevocationType
public eu.europa.esig.dss.enumerations.RevocationType getRevocationType()Description copied from class:RevocationTokenReturns the Revocation Token type (CRL or OCSP)- Specified by:
getRevocationTypein classRevocationToken<OCSP>- Returns:
RevocationTypeof the token
-
getAbbreviation
- Overrides:
getAbbreviationin classToken
-
toString
-