Class RevocationToken<R extends Revocation>
java.lang.Object
eu.europa.esig.dss.model.x509.Token
eu.europa.esig.dss.spi.x509.revocation.RevocationToken<R>
- All Implemented Interfaces:
Serializable
public abstract class RevocationToken<R extends Revocation> extends Token
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected Date
archiveCutOff
protected boolean
certHashMatch
Represents if the certHash extension from an OCSP Response is match with the related certificate's hash (optional)protected boolean
certHashPresent
Represents if the certHash extension from an OCSP Response is present (optional)protected Date
expiredCertsOnCRL
protected RevocationOrigin
externalOrigin
The external origin (ONLINE or CACHED)protected Date
nextUpdate
Represents the next update date of the CRL or null for OCSP response.protected Date
productionDate
Represents the production date of the OCSP response or the thisUpdate in case of CRL.protected RevocationReason
reason
The reason of the revocation.protected CertificateToken
relatedCertificate
RelatedCertificateToken
to this revocation objectprotected Date
revocationDate
Represents the revocation date from an X509CRLEntry or from an BasicOCSPResp (if the related certificate is revoked)protected String
revocationTokenKey
Revocation Token Key, used forRevocationToken
identification (i.e. id in DB)protected String
sourceURL
The URL which was used to obtain the revocation data (online).protected CertificateStatus
status
Contains the revocation status of the token.protected Date
thisUpdate
Represents the this update date of the CRL.Fields inherited from class eu.europa.esig.dss.model.x509.Token
publicKeyOfTheSigner, signatureAlgorithm, signatureInvalidityReason, signatureValidity
-
Constructor Summary
Constructors Constructor Description RevocationToken()
-
Method Summary
Modifier and Type Method Description protected TokenIdentifier
buildTokenIdentifier()
Builds a token unique identifierboolean
equals(Object obj)
Date
getArchiveCutOff()
Returns the archiveCutOff date (from an OCSP Response)abstract RevocationCertificateSource
getCertificateSource()
Returns a source of embedded into a revocation token certificatesDate
getCreationDate()
Returns the creation date of this token.Date
getExpiredCertsOnCRL()
Returns the expiredCertsOnCRL date (from CRL)RevocationOrigin
getExternalOrigin()
abstract CertificateToken
getIssuerCertificateToken()
Returns issuerCertificateToken
Date
getNextUpdate()
Returns the date of the next updateDate
getProductionDate()
Returns the generation time of the current revocation data (when it was signed)RevocationReason
getReason()
Returns the revocation reason (if the token has been revoked)String
getRelatedCertificateID()
Date
getRevocationDate()
Returns the revocation date (if the token has been revoked)String
getRevocationTokenKey()
Returns compiled revocation token keyabstract RevocationType
getRevocationType()
Returns the Revocation Token type (CRL or OCSP)String
getSourceURL()
Returns the URL of the source (if available)CertificateStatus
getStatus()
Returns the certificate statusDate
getThisUpdate()
int
hashCode()
boolean
isCertHashMatch()
Returns TRUE if the certHash extension (from an OCSP Response) is match to the hash of related certificate tokenboolean
isCertHashPresent()
Returns TRUE if the certHash extension (from an OCSP Response) is presentboolean
isInternal()
This method returns true if the token was not collected from an external resource (online or jdbc)abstract boolean
isValid()
Indicates if the token signature is intact and the signing certificate matches with the signature and if the extended key usage is present.void
setExternalOrigin(RevocationOrigin origin)
void
setRelatedCertificate(CertificateToken relatedCertificate)
void
setRevocationTokenKey(String key)
Sets the value for revocationTokenKeyvoid
setSourceURL(String sourceURL)
This sets the revocation data source URL.Methods inherited from class eu.europa.esig.dss.model.x509.Token
checkIsSignedBy, getAbbreviation, getDigest, getDSSId, getDSSIdAsString, getEncoded, getIssuerX500Principal, getPublicKeyOfTheSigner, getSignatureAlgorithm, getSignatureValidity, isSelfSigned, isSignedBy, toString, toString
-
Field Details
-
relatedCertificate
RelatedCertificateToken
to this revocation object -
sourceURL
The URL which was used to obtain the revocation data (online). -
externalOrigin
The external origin (ONLINE or CACHED) -
status
Contains the revocation status of the token. -
productionDate
Represents the production date of the OCSP response or the thisUpdate in case of CRL. -
thisUpdate
Represents the this update date of the CRL. -
nextUpdate
Represents the next update date of the CRL or null for OCSP response. -
revocationDate
Represents the revocation date from an X509CRLEntry or from an BasicOCSPResp (if the related certificate is revoked) -
expiredCertsOnCRL
-
archiveCutOff
-
certHashPresent
protected boolean certHashPresentRepresents if the certHash extension from an OCSP Response is present (optional) -
certHashMatch
protected boolean certHashMatchRepresents if the certHash extension from an OCSP Response is match with the related certificate's hash (optional) -
reason
The reason of the revocation. -
revocationTokenKey
Revocation Token Key, used forRevocationToken
identification (i.e. id in DB)
-
-
Constructor Details
-
RevocationToken
public RevocationToken()
-
-
Method Details
-
getRevocationType
Returns the Revocation Token type (CRL or OCSP)- Returns:
RevocationType
of the token
-
getRelatedCertificateID
-
setRelatedCertificate
-
getIssuerCertificateToken
Returns issuerCertificateToken
- Returns:
- issuer
CertificateToken
-
getSourceURL
Returns the URL of the source (if available)- Returns:
- URL of the CRL/OCSP Server (if available)
-
setSourceURL
This sets the revocation data source URL. It is only used in case ofOnlineSource
.- Parameters:
sourceURL
- the URL which was used to retrieve this CRL
-
getStatus
Returns the certificate status- Returns:
- the certificate status
-
getProductionDate
Returns the generation time of the current revocation data (when it was signed)- Returns:
- the production time of the current revocation data
-
getCreationDate
Description copied from class:Token
Returns the creation date of this token. This date is mainly used to retrieve the correct issuer within a collection of renewed certificates (new certificate with the same key pair).- Specified by:
getCreationDate
in classToken
- Returns:
- the creation date of the token (notBefore for a certificate, productionDate for revocation data,...)
-
getThisUpdate
-
getNextUpdate
Returns the date of the next update- Returns:
- the next update date
-
getRevocationDate
Returns the revocation date (if the token has been revoked)- Returns:
- the revocation date or null
-
getExpiredCertsOnCRL
Returns the expiredCertsOnCRL date (from CRL)- Returns:
- the expiredCertsOnCRL date value from a CRL or null
-
getArchiveCutOff
Returns the archiveCutOff date (from an OCSP Response)- Returns:
- the archiveCutOff date or null
-
isCertHashPresent
public boolean isCertHashPresent()Returns TRUE if the certHash extension (from an OCSP Response) is present- Returns:
- the TRUE if certHash is present, FALSE otherwise
-
isCertHashMatch
public boolean isCertHashMatch()Returns TRUE if the certHash extension (from an OCSP Response) is match to the hash of related certificate token- Returns:
- the TRUE if certHash is match, FALSE otherwise
-
getReason
Returns the revocation reason (if the token has been revoked)- Returns:
- the revocation reason or null
-
getRevocationTokenKey
Returns compiled revocation token key- Returns:
String
key
-
setRevocationTokenKey
Sets the value for revocationTokenKey- Parameters:
key
-String
-
getCertificateSource
Returns a source of embedded into a revocation token certificates- Returns:
RevocationCertificateSource
-
setExternalOrigin
-
getExternalOrigin
-
isInternal
public boolean isInternal()This method returns true if the token was not collected from an external resource (online or jdbc)- Returns:
- true if the token comes from a signature/timestamp
-
isValid
public abstract boolean isValid()Indicates if the token signature is intact and the signing certificate matches with the signature and if the extended key usage is present.- Returns:
true
if the conditions are meet
-
buildTokenIdentifier
Description copied from class:Token
Builds a token unique identifier- Specified by:
buildTokenIdentifier
in classToken
- Returns:
TokenIdentifier
-
hashCode
public int hashCode() -
equals
-