Class RevocationToken<R extends eu.europa.esig.dss.model.x509.revocation.Revocation>
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RevocationToken<R>
- Type Parameters:
R-Revocation
- All Implemented Interfaces:
Serializable
public abstract class RevocationToken<R extends eu.europa.esig.dss.model.x509.revocation.Revocation>
extends Object
Represents a revocation data token
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Datearchive-cut-off time extensionprotected booleanRepresents if the certHash extension from an OCSP Response is match with the related certificate's hash (optional)protected booleanRepresents if the certHash extension from an OCSP Response is present (optional)protected BigIntegerSequential number of revocation token (applicable for CRLs only)protected Dateexpired-certs-on-crl time extensionprotected eu.europa.esig.dss.enumerations.RevocationOriginThe external origin (ONLINE or CACHED)protected DateRepresents the next update date of the CRL or null for OCSP response.protected DateRepresents the production date of the OCSP response or the thisUpdate in case of CRL.protected PublicKeyprotected eu.europa.esig.dss.enumerations.RevocationReasonThe reason of the revocation.protected eu.europa.esig.dss.model.x509.CertificateTokenRelatedCertificateTokento this revocation objectprotected DateRepresents the revocation date from an X509CRLEntry or from an BasicOCSPResp (if the related certificate is revoked)protected eu.europa.esig.dss.enumerations.SignatureAlgorithmprotected Stringprotected eu.europa.esig.dss.enumerations.SignatureValidityprotected StringThe URL which was used to obtain the revocation data (online).protected eu.europa.esig.dss.enumerations.CertificateStatusContains the revocation status of the token.protected DateRepresents the this update date of the CRL. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionprotected eu.europa.esig.dss.model.identifier.TokenIdentifierprotected abstract eu.europa.esig.dss.enumerations.SignatureValiditycheckIsSignedBy(PublicKey arg0) booleanReturns the archiveCutOff date (from an OCSP Response)abstract List<eu.europa.esig.dss.model.x509.CertificateToken> Returns a collection of embedded certificates.abstract RevocationCertificateSourceReturns a source of embedded into a revocation token certificatesGets sequential number of the revocation token, when present (CRL only)byte[]getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) eu.europa.esig.dss.model.identifier.TokenIdentifiergetDSSId()abstract byte[]Returns the expiredCertsOnCRL date (from CRL)eu.europa.esig.dss.enumerations.RevocationOriginGets the external originabstract eu.europa.esig.dss.model.x509.CertificateTokenReturns issuerCertificateTokeneu.europa.esig.dss.model.identifier.EntityIdentifierabstract X500PrincipalReturns the date of the next updateReturns the generation time of the current revocation data (when it was signed)eu.europa.esig.dss.enumerations.RevocationReasonReturns the revocation reason (if the token has been revoked)eu.europa.esig.dss.model.x509.CertificateTokenReturns a certificate token the current revocation data has been issued forGets DSS String Id of the related certificateReturns the revocation date (if the token has been revoked)abstract eu.europa.esig.dss.enumerations.RevocationTypeReturns the Revocation Token type (CRL or OCSP)eu.europa.esig.dss.enumerations.SignatureAlgorithmeu.europa.esig.dss.enumerations.SignatureValidityReturns the URL of the source (if available)eu.europa.esig.dss.enumerations.CertificateStatusReturns the certificate statusReturns the date of the this updateinthashCode()booleanReturns TRUE if the certHash extension (from an OCSP Response) is match to the hash of related certificate tokenbooleanReturns TRUE if the certHash extension (from an OCSP Response) is presentbooleanThis method returns true if the token was not collected from an external resource (online or jdbc)booleanbooleanbooleanisSignedBy(eu.europa.esig.dss.model.x509.CertificateToken arg0) booleanisSignedBy(PublicKey arg0) booleanisValid()voidsetExternalOrigin(eu.europa.esig.dss.enumerations.RevocationOrigin origin) Sets the external originvoidsetSourceURL(String sourceURL) This sets the revocation data source URL.toString()abstract String
-
Field Details
-
sourceURL
The URL which was used to obtain the revocation data (online). -
externalOrigin
protected eu.europa.esig.dss.enumerations.RevocationOrigin externalOriginThe external origin (ONLINE or CACHED) -
status
protected eu.europa.esig.dss.enumerations.CertificateStatus statusContains 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) -
crlNumber
Sequential number of revocation token (applicable for CRLs only) -
expiredCertsOnCRL
expired-certs-on-crl time extension -
archiveCutOff
archive-cut-off time extension -
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
protected eu.europa.esig.dss.enumerations.RevocationReason reasonThe reason of the revocation. -
publicKeyOfTheSigner
-
signatureValidity
protected eu.europa.esig.dss.enumerations.SignatureValidity signatureValidity -
signatureInvalidityReason
-
signatureAlgorithm
protected eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm
-
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:
RevocationTypeof 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
-
getIssuerCertificateToken
public abstract eu.europa.esig.dss.model.x509.CertificateToken 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
public eu.europa.esig.dss.enumerations.CertificateStatus 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
-
getThisUpdate
-
getNextUpdate
-
getRevocationDate
Returns the revocation date (if the token has been revoked)- Returns:
- the revocation date or null
-
getCRLNumber
Gets sequential number of the revocation token, when present (CRL only)- Returns:
BigInteger
-
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
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
Returns a source of embedded into a revocation token certificates- Returns:
RevocationCertificateSource
-
getCertificates
Returns a collection of embedded certificates. NOTE: returns empty collection for CRL.- Returns:
- a list of
CertificateTokens
-
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() -
hashCode
public int hashCode() -
equals
-
isSelfSigned
public boolean isSelfSigned() -
getDSSId
public eu.europa.esig.dss.model.identifier.TokenIdentifier getDSSId() -
getDSSIdAsString
-
isSignedBy
public boolean isSignedBy(eu.europa.esig.dss.model.x509.CertificateToken arg0) -
isSignedBy
-
checkIsSignedBy
protected abstract eu.europa.esig.dss.enumerations.SignatureValidity checkIsSignedBy(PublicKey arg0) -
getIssuerX500Principal
-
getAbbreviation
-
getIssuerEntityKey
public eu.europa.esig.dss.model.identifier.EntityIdentifier getIssuerEntityKey() -
getSignatureAlgorithm
public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm() -
isSignatureIntact
public boolean isSignatureIntact() -
isValid
public boolean isValid() -
getSignatureValidity
public eu.europa.esig.dss.enumerations.SignatureValidity getSignatureValidity() -
getInvalidityReason
-
getPublicKeyOfTheSigner
-
toString
-
toString
-
getEncoded
public abstract byte[] getEncoded() -
getDigest
public byte[] getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
-