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
Direct Known Subclasses:
CRLToken, OCSPToken

public abstract class RevocationToken<R extends Revocation>
extends Token
See Also:
Serialized Form
  • Field Details

  • Constructor Details

  • Method Details

    • getRevocationType

      public abstract RevocationType getRevocationType()
      Returns the Revocation Token type (CRL or OCSP)
      Returns:
      RevocationType of the token
    • getRelatedCertificateID

      public String getRelatedCertificateID()
    • setRelatedCertificate

      public void setRelatedCertificate​(CertificateToken relatedCertificate)
    • getIssuerCertificateToken

      public abstract CertificateToken getIssuerCertificateToken()
      Returns issuer CertificateToken
      Returns:
      issuer CertificateToken
    • getSourceURL

      public String getSourceURL()
      Returns the URL of the source (if available)
      Returns:
      URL of the CRL/OCSP Server (if available)
    • setSourceURL

      public void setSourceURL​(String sourceURL)
      This sets the revocation data source URL. It is only used in case of OnlineSource.
      Parameters:
      sourceURL - the URL which was used to retrieve this CRL
    • getStatus

      public CertificateStatus getStatus()
      Returns the certificate status
      Returns:
      the certificate status
    • getProductionDate

      public Date getProductionDate()
      Returns the generation time of the current revocation data (when it was signed)
      Returns:
      the production time of the current revocation data
    • getCreationDate

      public Date 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 class Token
      Returns:
      the creation date of the token (notBefore for a certificate, productionDate for revocation data,...)
    • getThisUpdate

      public Date getThisUpdate()
    • getNextUpdate

      public Date getNextUpdate()
      Returns the date of the next update
      Returns:
      the next update date
    • getRevocationDate

      public Date getRevocationDate()
      Returns the revocation date (if the token has been revoked)
      Returns:
      the revocation date or null
    • getExpiredCertsOnCRL

      public Date getExpiredCertsOnCRL()
      Returns the expiredCertsOnCRL date (from CRL)
      Returns:
      the expiredCertsOnCRL date value from a CRL or null
    • getArchiveCutOff

      public Date 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

      public RevocationReason getReason()
      Returns the revocation reason (if the token has been revoked)
      Returns:
      the revocation reason or null
    • getRevocationTokenKey

      public String getRevocationTokenKey()
      Returns compiled revocation token key
      Returns:
      String key
    • setRevocationTokenKey

      public void setRevocationTokenKey​(String key)
      Sets the value for revocationTokenKey
      Parameters:
      key - String
    • getCertificateSource

      public abstract RevocationCertificateSource getCertificateSource()
      Returns a source of embedded into a revocation token certificates
      Returns:
      RevocationCertificateSource
    • setExternalOrigin

      public void setExternalOrigin​(RevocationOrigin origin)
    • getExternalOrigin

      public RevocationOrigin 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

      protected TokenIdentifier buildTokenIdentifier()
      Description copied from class: Token
      Builds a token unique identifier
      Specified by:
      buildTokenIdentifier in class Token
      Returns:
      TokenIdentifier
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Token
    • equals

      public boolean equals​(Object obj)
      Overrides:
      equals in class Token