Class OCSPToken
java.lang.Object
eu.europa.esig.dss.model.x509.Token
eu.europa.esig.dss.spi.x509.revocation.RevocationToken
eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken
- All Implemented Interfaces:
Serializable
public class OCSPToken extends RevocationToken
OCSP Signed Token which encapsulate BasicOCSPResp (BC).
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.RevocationToken
archiveCutOff, available, certHashMatch, certHashPresent, expiredCertsOnCRL, nextUpdate, productionDate, reason, relatedCertificate, revocationDate, revocationTokenKey, revocationType, sourceURL, status, thisUpdate
Fields inherited from class eu.europa.esig.dss.model.x509.Token
publicKeyOfTheSigner, signatureAlgorithm, signatureInvalidityReason, signatureValidity
-
Constructor Summary
Constructors Constructor Description OCSPToken()
-
Method Summary
Modifier and Type Method Description protected SignatureValidity
checkIsSignedBy(CertificateToken candidate)
Verifies if the current token has been signed by the specified certificateTokenString
getAbbreviation()
This method returns the DSS abbreviation of the token.org.bouncycastle.cert.ocsp.BasicOCSPResp
getBasicOCSPResp()
byte[]
getEncoded()
Returns the encoded form of the wrapped token.X500Principal
getIssuerX500Principal()
Returns theX500Principal
of the certificate which was used to sign this token.OCSPRespStatus
getResponseStatus()
void
initInfo()
Initialize inner attributesboolean
isNonceMatch()
boolean
isUseNonce()
boolean
isValid()
Indicates if the token signature is intact.void
setBasicOCSPResp(org.bouncycastle.cert.ocsp.BasicOCSPResp basicOCSPResp)
void
setCertificateToken(CertificateToken certificateToken)
void
setIssuerCertificateToken(CertificateToken issuerCertificateToken)
void
setNonceMatch(boolean nonceMatch)
void
setResponseStatus(OCSPRespStatus responseStatus)
void
setUseNonce(boolean useNonce)
String
toString(String indentStr)
Returns a string representation of the token.Methods inherited from class eu.europa.esig.dss.spi.x509.revocation.RevocationToken
equals, getArchiveCutOff, getCreationDate, getDSSIdAsString, getExpiredCertsOnCRL, getFirstOrigin, getNextUpdate, getOrigins, getProductionDate, getReason, getRelatedCertificateID, getRevocationDate, getRevocationTokenKey, getRevocationType, getSourceURL, getStatus, getThisUpdate, hashCode, isAvailable, isCertHashMatch, isCertHashPresent, setAvailable, setOrigins, setRelatedCertificate, setRevocationTokenKey, setSourceURL
Methods inherited from class eu.europa.esig.dss.model.x509.Token
getDigest, getDSSId, getPublicKeyOfTheSigner, getSignatureAlgorithm, getSignatureValidity, isSelfSigned, isSignedBy, toString
-
Constructor Details
-
OCSPToken
public OCSPToken()
-
-
Method Details
-
initInfo
public void initInfo()Description copied from class:RevocationToken
Initialize inner attributes- Specified by:
initInfo
in classRevocationToken
-
checkIsSignedBy
Description copied from class:Token
Verifies if the current token has been signed by the specified certificateToken- Specified by:
checkIsSignedBy
in classToken
- Parameters:
candidate
-CertificateToken
signed candidate- Returns:
SignatureValidity
-
getResponseStatus
-
setResponseStatus
-
setCertificateToken
-
setIssuerCertificateToken
-
isUseNonce
public boolean isUseNonce() -
setUseNonce
public void setUseNonce(boolean useNonce) -
isNonceMatch
public boolean isNonceMatch() -
setNonceMatch
public void setNonceMatch(boolean nonceMatch) -
getBasicOCSPResp
public org.bouncycastle.cert.ocsp.BasicOCSPResp getBasicOCSPResp() -
setBasicOCSPResp
public void setBasicOCSPResp(org.bouncycastle.cert.ocsp.BasicOCSPResp basicOCSPResp) -
isValid
public boolean isValid()Indicates if the token signature is intact.- Specified by:
isValid
in classRevocationToken
- Returns:
true
orfalse
-
getAbbreviation
Description copied from class:Token
This method returns the DSS abbreviation of the token. It is used for debugging purpose.- Overrides:
getAbbreviation
in classToken
- Returns:
- an abbreviation for the certificate
-
toString
Description copied from class:Token
Returns a string representation of the token. -
getEncoded
public byte[] getEncoded()Description copied from class:Token
Returns the encoded form of the wrapped token.- Specified by:
getEncoded
in classToken
- Returns:
- the encoded form of the wrapped token
-
getIssuerX500Principal
Description copied from class:Token
Returns theX500Principal
of the certificate which was used to sign this token.- Specified by:
getIssuerX500Principal
in classToken
- Returns:
- the issuer's
X500Principal
-