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 SignatureValiditycheckIsSignedBy(PublicKey publicKey) Verifies if the current OCSP token has been signed by the specified publicKeyThis method returns the DSS abbreviation of the token.org.bouncycastle.cert.ocsp.BasicOCSPRespReturns theBasicOCSPRespReturns a source of embedded into a revocation token certificatesbyte[]Returns the encoded form of the wrapped token.Returns issuerCertificateTokenReturns theX500Principalof the certificate which was used to sign this token.org.bouncycastle.cert.ocsp.SingleRespReturns the latest single responseReturns the Revocation Token type (CRL or OCSP)Returns the algorithm that was used to sign the token (ex: SHA1WithRSAEncryption, SHA1withRSA...).booleanisValid()Indicates if the token signature is intact.Returns a string representation of the token.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, getPublicKeyOfTheSigner, getSignatureValidity, isSelfSigned, 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
Description copied from class:TokenReturns the algorithm that was used to sign the token (ex: SHA1WithRSAEncryption, SHA1withRSA...).- Overrides:
getSignatureAlgorithmin classToken- Returns:
- the used signature algorithm to sign this token
-
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()Description copied from class:TokenReturns the encoded form of the wrapped token.- Specified by:
getEncodedin classToken- Returns:
- the encoded form of the wrapped token
-
getIssuerX500Principal
Description copied from class:TokenReturns theX500Principalof the certificate which was used to sign this token.- Specified by:
getIssuerX500Principalin classToken- Returns:
- the issuer's
X500Principal
-
getIssuerCertificateToken
Description copied from class:RevocationTokenReturns issuerCertificateToken- Specified by:
getIssuerCertificateTokenin classRevocationToken<OCSP>- Returns:
- issuer
CertificateToken
-
isValid
public boolean isValid()Indicates if the token signature is intact. NOTE: The method isSignedBy(token) must be called before!- Specified by:
isValidin classRevocationToken<OCSP>- Returns:
trueorfalse
-
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
-
getRevocationType
Description copied from class:RevocationTokenReturns the Revocation Token type (CRL or OCSP)- Specified by:
getRevocationTypein classRevocationToken<OCSP>- Returns:
RevocationTypeof the token
-
getAbbreviation
Description copied from class:TokenThis method returns the DSS abbreviation of the token. It is used for debugging purpose.- Overrides:
getAbbreviationin classToken- Returns:
- an abbreviation for the certificate
-
toString
Description copied from class:TokenReturns a string representation of the token.
-