Package eu.europa.esig.dss.diagnostic
Class TimestampWrapper
java.lang.Object
eu.europa.esig.dss.diagnostic.AbstractTokenProxy
eu.europa.esig.dss.diagnostic.AbstractSignatureWrapper
eu.europa.esig.dss.diagnostic.TimestampWrapper
- All Implemented Interfaces:
TokenProxy
Provides a user-friendly interface for dealing with JAXB
XmlTimestamp
object-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns FoundCertificatesProxy to access embedded certificatesReturns FoundRevocationsProxy to access embedded revocation dataReturns a list of all OrphanTokensReturns archive timestamp type, if applicable NOTE: returns null for non archive timestampsbyte[]
Returns binaries of the token, when presentprotected XmlBasicSignature
Returns a basic signature validationprotected List<XmlChainItem>
Returns the token's certificate chainprotected XmlSigningCertificate
Returns the signing certificate of the tokenReturns digest algorithm and value of the timestamp token binaries, when definedReturns a list of DigestMatchers used in the validation process for a signature or timestampGets name of the timestamp file, when applicablegetId()
Returns the unique identifier of the objectReturns message-imprintXmlDigestMatcher
Returns a PAdES-specific PDF Revision info NOTE: applicable only for PDF Document TimestampReturns the indicated production time of the timestampReturns a list if Signer Infos (Signer Information Store) from CAdES CMS Signed DataReturns a list of certificates covered be the current timestampReturns a complete list of allXmlTimestampedObject
s covered by the timestampReturns a list of OrphanCertificateTokensReturns a list of OrphanRevocationTokensReturns a list of revocation data covered be the current timestampReturns a list ofSignatureWrapper
s covered be the current timestampReturns a list of Signed data covered be the current timestampReturns a list of timestamps covered be the current timestampReturns Timestamp's Signature ScopesGet TSA General Name valuegetType()
Returns the type of the timestampboolean
Indicates if the message-imprint is found (all the required data for message-imprint computation is present)boolean
Indicates if the message-imprint is intact (matches the computed message-imprint)boolean
Indicates if the signing certificate reference is present within the timestamp token and matches the actual signing certificateboolean
Checks if the content of TSTInfo.tsa field matches the timestamp's issuer distinguishing name, without taking order into accountboolean
Checks if the content and the order of TSTInfo.tsa field match the timestamp's issuer distinguishing nameboolean
Checks if the tsa field of TSTInfo is presentMethods inherited from class eu.europa.esig.dss.diagnostic.AbstractSignatureWrapper
arePdfModificationsDetected, arePdfObjectModificationsDetected, getContactInfo, getDocMDPPermissions, getFieldMDP, getFilter, getFirstFieldName, getLocation, getModifiedFieldNames, getPdfAnnotationChanges, getPdfAnnotationsOverlapConcernedPages, getPdfExtensionChanges, getPdfPageDifferenceConcernedPages, getPdfSignatureOrFormFillChanges, getPdfUndefinedChanges, getPdfVisualDifferenceConcernedPages, getReason, getSigFieldLock, getSignatureByteRange, getSignatureDictionaryType, getSignatureFieldNames, getSignerName, getSubFilter, isPdfSignatureDictionaryConsistent, isSignatureByteRangeValid
Methods inherited from class eu.europa.esig.dss.diagnostic.AbstractTokenProxy
equals, getCertificateChain, getDigestAlgorithm, getEncryptionAlgorithm, getKeyLengthUsedToSignThisToken, getMaskGenerationFunction, getSignatureAlgorithm, getSigningCertificate, getSigningCertificatePublicKey, getSigningCertificateReference, getSigningCertificateReferences, hashCode, isCertificateChainFromTrustedStore, isSignatureIntact, isSignatureValid, isSigningCertificateReferencePresent, isSigningCertificateReferenceUnique, isTrustedChain, toString
-
Constructor Details
-
TimestampWrapper
Default constructor- Parameters:
timestamp
-XmlTimestamp
-
-
Method Details
-
getId
Description copied from interface:TokenProxy
Returns the unique identifier of the object- Returns:
String
id
-
getCurrentBasicSignature
Description copied from class:AbstractTokenProxy
Returns a basic signature validation- Specified by:
getCurrentBasicSignature
in classAbstractTokenProxy
- Returns:
XmlBasicSignature
-
getCurrentCertificateChain
Description copied from class:AbstractTokenProxy
Returns the token's certificate chain- Specified by:
getCurrentCertificateChain
in classAbstractTokenProxy
- Returns:
- a list of
XmlChainItem
s
-
getCurrentSigningCertificate
Description copied from class:AbstractTokenProxy
Returns the signing certificate of the token- Specified by:
getCurrentSigningCertificate
in classAbstractTokenProxy
- Returns:
XmlSigningCertificate
-
foundCertificates
Description copied from interface:TokenProxy
Returns FoundCertificatesProxy to access embedded certificates- Specified by:
foundCertificates
in interfaceTokenProxy
- Overrides:
foundCertificates
in classAbstractTokenProxy
- Returns:
FoundCertificatesProxy
-
foundRevocations
Description copied from interface:TokenProxy
Returns FoundRevocationsProxy to access embedded revocation data- Specified by:
foundRevocations
in interfaceTokenProxy
- Overrides:
foundRevocations
in classAbstractTokenProxy
- Returns:
FoundRevocationsProxy
-
getType
Returns the type of the timestamp- Returns:
TimestampType
-
getArchiveTimestampType
Returns archive timestamp type, if applicable NOTE: returns null for non archive timestamps- Returns:
ArchiveTimestampType
-
getProductionTime
Returns the indicated production time of the timestamp- Returns:
Date
-
getMessageImprint
Returns message-imprintXmlDigestMatcher
- Returns:
XmlDigestMatcher
-
isMessageImprintDataFound
public boolean isMessageImprintDataFound()Indicates if the message-imprint is found (all the required data for message-imprint computation is present)- Returns:
- TRUE if the message-imprint data is found, FALSE otherwise
-
isMessageImprintDataIntact
public boolean isMessageImprintDataIntact()Indicates if the message-imprint is intact (matches the computed message-imprint)- Returns:
- TRUE if the message-imprint data is intact, FALSE otherwise
-
getFilename
Gets name of the timestamp file, when applicable- Returns:
String
file name
-
getDigestMatchers
Description copied from interface:TokenProxy
Returns a list of DigestMatchers used in the validation process for a signature or timestamp- Specified by:
getDigestMatchers
in interfaceTokenProxy
- Overrides:
getDigestMatchers
in classAbstractTokenProxy
- Returns:
- a list of
XmlDigestMatcher
s
-
getTimestampedObjects
Returns a complete list of allXmlTimestampedObject
s covered by the timestamp- Returns:
- list of
XmlTimestampedObject
s
-
getTimestampedSignatures
Returns a list ofSignatureWrapper
s covered be the current timestamp- Returns:
- list of
SignatureWrapper
s
-
getTimestampedCertificates
Returns a list of certificates covered be the current timestamp- Returns:
- list of
CertificateWrapper
s
-
getTimestampedRevocations
Returns a list of revocation data covered be the current timestamp- Returns:
- list of
RevocationWrapper
s
-
getTimestampedTimestamps
Returns a list of timestamps covered be the current timestamp- Returns:
- list of
TimestampWrapper
s
-
getTimestampedSignedData
Returns a list of Signed data covered be the current timestamp- Returns:
- list of
SignerDataWrapper
s
-
isSigningCertificateIdentified
public boolean isSigningCertificateIdentified()Indicates if the signing certificate reference is present within the timestamp token and matches the actual signing certificate- Returns:
- TRUE if the signing certificate is unambiguously identified, FALSE otherwise
-
getAllTimestampedOrphanTokens
Returns a list of all OrphanTokens- Returns:
- list of
OrphanTokenWrapper
s
-
getTimestampedOrphanCertificates
Returns a list of OrphanCertificateTokens- Returns:
- list of orphan certificates
-
getTimestampedOrphanRevocations
Returns a list of OrphanRevocationTokens- Returns:
- list of orphan revocations
-
getBinaries
public byte[] getBinaries()Description copied from class:AbstractTokenProxy
Returns binaries of the token, when present- Specified by:
getBinaries
in classAbstractTokenProxy
- Returns:
- a byte array
-
getDigestAlgoAndValue
Returns digest algorithm and value of the timestamp token binaries, when defined- Returns:
XmlDigestAlgoAndValue
-
getPDFRevision
Returns a PAdES-specific PDF Revision info NOTE: applicable only for PDF Document Timestamp- Specified by:
getPDFRevision
in classAbstractSignatureWrapper
- Returns:
PDFRevisionWrapper
-
getSignatureInformationStore
Returns a list if Signer Infos (Signer Information Store) from CAdES CMS Signed Data- Returns:
- list of
XmlSignerInfo
s
-
isTSAGeneralNamePresent
public boolean isTSAGeneralNamePresent()Checks if the tsa field of TSTInfo is present- Returns:
- TRUE if the TSTInfo.tsa is present, FALSE otherwise
-
getTSAGeneralNameValue
Get TSA General Name value- Returns:
String
representing a TSTInfo.tsa field when present, null otherwise
-
isTSAGeneralNameMatch
public boolean isTSAGeneralNameMatch()Checks if the content of TSTInfo.tsa field matches the timestamp's issuer distinguishing name, without taking order into account- Returns:
- TRUE if the TSTInfo.tsa field value matches the timestamp's issuer name, FALSE otherwise
-
isTSAGeneralNameOrderMatch
public boolean isTSAGeneralNameOrderMatch()Checks if the content and the order of TSTInfo.tsa field match the timestamp's issuer distinguishing name- Returns:
- TRUE if the TSTInfo.tsa field value and order match the timestamp's issuer name, FALSE otherwise
-
getTimestampScopes
Returns Timestamp's Signature Scopes- Returns:
- a list of
XmlSignatureScope
s
-