Module jpms_dss_spi

Class RevocationToken<R extends eu.europa.esig.dss.model.x509.revocation.Revocation>

java.lang.Object
eu.europa.esig.dss.model.x509.Token
eu.europa.esig.dss.spi.x509.revocation.RevocationToken<R>
Type Parameters:
R - Revocation
All Implemented Interfaces:
eu.europa.esig.dss.model.identifier.IdentifierBasedObject, Serializable
Direct Known Subclasses:
CRLToken, OCSPToken

public abstract class RevocationToken<R extends eu.europa.esig.dss.model.x509.revocation.Revocation> extends eu.europa.esig.dss.model.x509.Token
Represents a revocation data token
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Date
    archive-cut-off time extension
    protected boolean
    Represents if the certHash extension from an OCSP Response is match with the related certificate's hash (optional)
    protected boolean
    Represents if the certHash extension from an OCSP Response is present (optional)
    protected Date
    expired-certs-on-crl time extension
    protected eu.europa.esig.dss.enumerations.RevocationOrigin
    The external origin (ONLINE or CACHED)
    protected Date
    Represents the next update date of the CRL or null for OCSP response.
    protected Date
    Represents the production date of the OCSP response or the thisUpdate in case of CRL.
    protected eu.europa.esig.dss.enumerations.RevocationReason
    The reason of the revocation.
    protected eu.europa.esig.dss.model.x509.CertificateToken
    Related CertificateToken to this revocation object
    protected Date
    Represents the revocation date from an X509CRLEntry or from an BasicOCSPResp (if the related certificate is revoked)
    protected String
    The URL which was used to obtain the revocation data (online).
    protected eu.europa.esig.dss.enumerations.CertificateStatus
    Contains the revocation status of the token.
    protected Date
    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
    Modifier
    Constructor
    Description
    protected
    Default constructor instantiating object with null values
  • Method Summary

    Modifier and Type
    Method
    Description
    protected eu.europa.esig.dss.model.identifier.TokenIdentifier
     
    boolean
     
    Returns the archiveCutOff date (from an OCSP Response)
    Returns a source of embedded into a revocation token certificates
     
    Returns the expiredCertsOnCRL date (from CRL)
    eu.europa.esig.dss.enumerations.RevocationOrigin
    Gets the external origin
    abstract eu.europa.esig.dss.model.x509.CertificateToken
    Returns issuer CertificateToken
    Returns the date of the next update
    Returns the generation time of the current revocation data (when it was signed)
    eu.europa.esig.dss.enumerations.RevocationReason
    Returns the revocation reason (if the token has been revoked)
    eu.europa.esig.dss.model.x509.CertificateToken
    Returns a certificate token the current revocation data has been issued for
    Gets DSS String Id of the related certificate
    Returns the revocation date (if the token has been revoked)
    abstract eu.europa.esig.dss.enumerations.RevocationType
    Returns the Revocation Token type (CRL or OCSP)
    Returns the URL of the source (if available)
    eu.europa.esig.dss.enumerations.CertificateStatus
    Returns the certificate status
    Returns the date of the this update
    int
     
    boolean
    Returns TRUE if the certHash extension (from an OCSP Response) is match to the hash of related certificate token
    boolean
    Returns TRUE if the certHash extension (from an OCSP Response) is present
    boolean
    This method returns true if the token was not collected from an external resource (online or jdbc)
    void
    setExternalOrigin(eu.europa.esig.dss.enumerations.RevocationOrigin origin)
    Sets the external origin
    void
    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, getInvalidityReason, getIssuerX500Principal, getPublicKeyOfTheSigner, getSignatureAlgorithm, getSignatureValidity, isSelfSigned, isSignatureIntact, isSignedBy, isSignedBy, isValid, toString, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • relatedCertificate

      protected eu.europa.esig.dss.model.x509.CertificateToken relatedCertificate
      Related CertificateToken to this revocation object
    • sourceURL

      protected String sourceURL
      The URL which was used to obtain the revocation data (online).
    • externalOrigin

      protected eu.europa.esig.dss.enumerations.RevocationOrigin externalOrigin
      The external origin (ONLINE or CACHED)
    • status

      protected eu.europa.esig.dss.enumerations.CertificateStatus status
      Contains the revocation status of the token.
    • productionDate

      protected Date productionDate
      Represents the production date of the OCSP response or the thisUpdate in case of CRL.
    • thisUpdate

      protected Date thisUpdate
      Represents the this update date of the CRL.
    • nextUpdate

      protected Date nextUpdate
      Represents the next update date of the CRL or null for OCSP response.
    • revocationDate

      protected Date revocationDate
      Represents the revocation date from an X509CRLEntry or from an BasicOCSPResp (if the related certificate is revoked)
    • expiredCertsOnCRL

      protected Date expiredCertsOnCRL
      expired-certs-on-crl time extension
    • archiveCutOff

      protected Date archiveCutOff
      archive-cut-off time extension
    • certHashPresent

      protected boolean certHashPresent
      Represents if the certHash extension from an OCSP Response is present (optional)
    • certHashMatch

      protected boolean certHashMatch
      Represents if the certHash extension from an OCSP Response is match with the related certificate's hash (optional)
    • reason

      protected eu.europa.esig.dss.enumerations.RevocationReason reason
      The reason of the revocation.
  • Constructor Details

    • RevocationToken

      protected RevocationToken()
      Default constructor instantiating object with null values
  • Method Details

    • getRevocationType

      public abstract eu.europa.esig.dss.enumerations.RevocationType getRevocationType()
      Returns the Revocation Token type (CRL or OCSP)
      Returns:
      RevocationType of the token
    • getRelatedCertificate

      public eu.europa.esig.dss.model.x509.CertificateToken getRelatedCertificate()
      Returns a certificate token the current revocation data has been issued for
      Returns:
      CertificateToken
    • getRelatedCertificateId

      public String getRelatedCertificateId()
      Gets DSS String Id of the related certificate
      Returns:
      String
    • getIssuerCertificateToken

      public abstract eu.europa.esig.dss.model.x509.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 eu.europa.esig.dss.enumerations.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()
      Specified by:
      getCreationDate in class eu.europa.esig.dss.model.x509.Token
    • getThisUpdate

      public Date getThisUpdate()
      Returns the date of the this update
      Returns:
      the this update date
    • 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 eu.europa.esig.dss.enumerations.RevocationReason getReason()
      Returns the revocation reason (if the token has been revoked)
      Returns:
      the revocation reason or null
    • getCertificateSource

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

      public void setExternalOrigin(eu.europa.esig.dss.enumerations.RevocationOrigin origin)
      Sets the external origin
      Parameters:
      origin - RevocationOrigin
    • getExternalOrigin

      public eu.europa.esig.dss.enumerations.RevocationOrigin getExternalOrigin()
      Gets the external origin
      Returns:
      RevocationOrigin
    • 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
    • buildTokenIdentifier

      protected eu.europa.esig.dss.model.identifier.TokenIdentifier buildTokenIdentifier()
      Specified by:
      buildTokenIdentifier in class eu.europa.esig.dss.model.x509.Token
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class eu.europa.esig.dss.model.x509.Token
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class eu.europa.esig.dss.model.x509.Token