Package eu.europa.esig.dss.diagnostic
Class DiagnosticData
java.lang.Object
eu.europa.esig.dss.diagnostic.DiagnosticData
This class represents all static data extracted by the process analysing the signature. They are independent from the
validation policy to be applied.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns counter-signatures (not signatures)getAllCounterSignaturesForMasterSignature
(SignatureWrapper masterSignatureWrapper) Returns a set ofSignatureWrapper
s for a givenmasterSignatureWrapper
Returns a list of all foundOrphanCertificateWrapper
valuesReturns a list of all found orphan certificate referencesReturns a list of all foundOrphanRevocationWrapper
valuesReturns a list of all found orphan revocation referencesThis method returns all revocation dataThis method returns signatures (not countersignatures)This method returns a list of all covered documents, including the ones covering by timestamp(s), when applicableReturnsCertificateWrapper
with the givenid
getCertificateDN
(String dssCertificateId) This method returns the subject distinguished name for the given dss certificate identifier.getCertificateIssuerDN
(String dssCertificateId) This method returns the issuer distinguished name for the given dss certificate identifier.getCertificateRevocationReason
(String dssCertificateId) This method returns the revocation reason for the given certificate.getCertificateRevocationSource
(String dssCertificateId) This method returns the revocation source for the given certificate.getCertificateRevocationStatus
(String dssCertificateId) This method returns the revocation status for the given certificate.getCertificateSerialNumber
(String dssCertificateId) This method returns the serial number of the given dss certificate identifier.getCertificatesFromSource
(CertificateSourceType certificateSourceType) Returns a list of certificates by their origin sourceReturns information about ASiC container (when applicable)This method returns the container typegetCrossCertificates
(CertificateWrapper certificate) Returns a list of cross-certificatesReturns a name of the validating documentgetEquivalentCertificates
(CertificateWrapper certificate) Returns a list of equivalent certificates (certificates with the same public key)getErrorMessage
(String signatureId) This method retrieves the error message for the given signature idReturns the EvidenceRecordWrapper corresponding to the given id.This method retrieves a list of evidence record wrappersThe identifier of the policy of the first signature.This method returns the first signature time.This method returns theDigestAlgorithm
of the first signature.This method returns theEncryptionAlgorithm
of the first signature.This method returns the signature format for the first signature.This method returns the first signature id.This method returns the JAXB modelgetLatestRevocationDataForCertificate
(CertificateWrapper certificate) Returns the last actual revocation for the givencertificate
This method returns the JAXB model of the LOTLThis method returns the content of the mimetype file (if container)Returns a list of time-stamp tokens which are not evidence record time-stampsReturns a complete list of original signer documents signed by all signaturesThis method returns an orphan certificate wrapper for the given certificate idgetOrphanCrossCertificates
(CertificateWrapper certificate) Returns a list of orphan cross-certificatesgetOrphanEquivalentCertificates
(CertificateWrapper certificate) Returns a list of orphan equivalent certificates (certificates with the same public key)Returns evaluated PDF/A profile IdReturns a collection of PDF/A validation errors occurred during the validationgetPolicyDescription
(String signatureId) The description of the policy.getPolicyDocumentationReferences
(String signatureId) The documentation references of the policygetPolicyId
(String signatureId) The identifier of the policy.ReturnsRevocationWrapper
with the givenid
This method returns a signature wrapper for the given signature idgetSignatureCertificateChain
(String signatureId) This method returns the list of certificates in the chain of the main signature.getSignatureDate
(String signatureId) This method returns the claimed signing time.getSignatureDigestAlgorithm
(String signatureId) This method returns theDigestAlgorithm
for the given signature.getSignatureEncryptionAlgorithm
(String signatureId) This method returns theDigestAlgorithm
for the given signature.getSignatureFormat
(String signatureId) This method returns the signature format for the given signature.This method returns the list of the signature id.getSignatureMaskGenerationFunction
(String signatureId) Deprecated.since DSS 6.1.This method retrieves a list of signature wrappers.getSignedAssertions
(String signatureId) This method returns the signed assertions for the given signature.This method returns the signed assertions for the first signature.getSignerDocuments
(String signatureId) Returns a list of all Signer's documents used to create a signature NOTE: returns a first level documents only (e.g. a signed Manifest for XAdES, when applicable)getSigningCertificateId
(String signatureId) This method returns signing certificate dss id for the given signature.Returns the TimestampWrapper corresponding to the given id.This method returns the list of identifier of the all timestamps found during the validation.getTimestampIdList
(String signatureId) This method returns the list of identifier of the timestamps related to the given signature.This method retrieves a list of timestamp wrappersgetTimestampList
(String signatureId) This method returns the list of timestamps wrappers which covers the given signature.getTimestampsByType
(TimestampType timestampType) Returns a list ofTimestampWrapper
s for the givenTimestampType
getTimestampSigningCertificateId
(String timestampId) Returns the identifier of the timestamp signing certificate.getTimestampType
(String timestampId) This method returns the timestamp type of the given timestampThis method returns the JAXB model of the used trusted listsThis method returns a certificate wrapper for the given certificate idThis method returns a certificate wrapper for the given certificate idThis method retrieves a list of certificate wrappersReturns the validation timeThis method returns the zip comment (if the document is a container)boolean
isALevelTechnicallyValid
(String signatureId) Indicates if the -A (-LTA) level is technically valid.boolean
isBLevelTechnicallyValid
(String signatureId) Indicates if the -B level is technically valid.boolean
This method checks if the document is a container (ASiC)boolean
This method checks if the container has a mimetype fileboolean
Returns whether the document is a PDF/A compliant (PDF/A validation shall be performed!)boolean
Returns whether a document has been validated against PDF/A complianceboolean
isSigningCertificateIdentified
(String signatureId) This method indicates if the digest value and the issuer and serial match for the signing certificate .boolean
isThereALevel
(String signatureId) Indicates if there is an archive timestamp.boolean
isThereTLevel
(String signatureId) Indicates if there is a signature timestamp.boolean
isThereXLevel
(String signatureId) Indicates if there is an -X1 or -X2 timestamp.boolean
isTLevelTechnicallyValid
(String signatureId) Indicates if the -T level is technically valid.boolean
isValidCertificate
(String dssCertificateId) This method indicates if the certificate signature is valid and the revocation status is valid.boolean
isXLevelTechnicallyValid
(String signatureId) Indicates if the -X level is technically valid.
-
Constructor Details
-
DiagnosticData
Default constructor- Parameters:
wrapped
-XmlDiagnosticData
-
-
Method Details
-
getDocumentName
-
getSignatureIdList
-
getFirstSignatureId
This method returns the first signature id.- Returns:
- the first signature id
-
getFirstSignatureDate
This method returns the first signature time.- Returns:
- the first signature time
-
getSignatureDate
-
getFirstSignatureFormat
This method returns the signature format for the first signature.- Returns:
- The first signature format
-
getSignatureFormat
This method returns the signature format for the given signature.- Parameters:
signatureId
- The identifier of the signature, for which the format is sought.- Returns:
- The signature format
-
getSignedAssertionsInFirstSignature
This method returns the signed assertions for the first signature.- Returns:
- list of
XmlSignerRole
s
-
getSignedAssertions
This method returns the signed assertions for the given signature.- Parameters:
signatureId
- The identifier of the signature, for which the signed assertions are sought.- Returns:
- list of
XmlSignerRole
s
-
getFirstSignatureDigestAlgorithm
This method returns theDigestAlgorithm
of the first signature.- Returns:
- The
DigestAlgorithm
of the first signature
-
getSignatureDigestAlgorithm
This method returns theDigestAlgorithm
for the given signature.- Parameters:
signatureId
- The identifier of the signature, for which the algorithm is sought.- Returns:
- The
DigestAlgorithm
for the given signature
-
getFirstSignatureEncryptionAlgorithm
This method returns theEncryptionAlgorithm
of the first signature.- Returns:
- The
EncryptionAlgorithm
of the first signature
-
getSignatureEncryptionAlgorithm
This method returns theDigestAlgorithm
for the given signature.- Parameters:
signatureId
- The identifier of the signature, for which the algorithm is sought.- Returns:
- The
DigestAlgorithm
for the given signature
-
getSignatureMaskGenerationFunction
Deprecated.since DSS 6.1. Please use#getSignatureEncryptionAlgorithm
method to determine the mask generation function (i.e. RSA for none MGF, RSASSA-PSS for MGF1)This method returns theMaskGenerationFunction
for the given signature.- Parameters:
signatureId
- The identifier of the signature, for which the algorithm is sought.- Returns:
- The
MaskGenerationFunction
for the given signature
-
getSigningCertificateId
-
isSigningCertificateIdentified
This method indicates if the digest value and the issuer and serial match for the signing certificate .- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the digest value and the issuer and serial match.
-
getSignatureCertificateChain
-
getFirstPolicyId
The identifier of the policy of the first signature.- Returns:
- the policy identifier of the first signature
-
getPolicyId
-
getPolicyDescription
-
getPolicyDocumentationReferences
-
getTimestampIdList
-
getTimestampIdList
-
getTimestampList
This method returns the list of timestamps wrappers which covers the given signature.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- The list of timestamp wrappers
-
isBLevelTechnicallyValid
Indicates if the -B level is technically valid. It means that the signature value is valid.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the signature value is valid
-
isThereTLevel
Indicates if there is a signature timestamp.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the signature timestamp is present
-
isTLevelTechnicallyValid
Indicates if the -T level is technically valid. It means that the signature and the digest are valid.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the signature and digest are valid
-
isThereXLevel
Indicates if there is an -X1 or -X2 timestamp.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the -X1 or -X2 is present
-
isXLevelTechnicallyValid
Indicates if the -X level is technically valid. It means that the signature and the digest are valid.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the signature and digest are valid
-
isThereALevel
Indicates if there is an archive timestamp.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the archive timestamp is present
-
isALevelTechnicallyValid
Indicates if the -A (-LTA) level is technically valid. It means that the signature of the archive timestamps are valid and their imprint is valid too.- Parameters:
signatureId
- The identifier of the signature.- Returns:
- true if the signature and digest are valid
-
getSignerDocuments
Returns a list of all Signer's documents used to create a signature NOTE: returns a first level documents only (e.g. a signed Manifest for XAdES, when applicable)- Parameters:
signatureId
- The identifier of the signature.- Returns:
- a list of
SignerDataWrapper
signer's documents
-
getTimestampSigningCertificateId
-
getTimestampType
This method returns the timestamp type of the given timestamp- Parameters:
timestampId
- the timestamp id- Returns:
- the related timestamp type
-
getTimestampsByType
Returns a list ofTimestampWrapper
s for the givenTimestampType
- Parameters:
timestampType
-TimestampType
to get time-stamps for- Returns:
- a list of
TimestampWrapper
-
isValidCertificate
This method indicates if the certificate signature is valid and the revocation status is valid.- Parameters:
dssCertificateId
- DSS certificate identifier to be checked- Returns:
- certificate validity
-
getCertificateDN
-
getCertificateIssuerDN
-
getCertificateSerialNumber
-
getCertificateRevocationSource
This method returns the revocation source for the given certificate.- Parameters:
dssCertificateId
- DSS certificate identifier to be checked- Returns:
- revocation source
-
getCertificateRevocationStatus
This method returns the revocation status for the given certificate.- Parameters:
dssCertificateId
- DSS certificate identifier to be checked- Returns:
- certificate status
-
getCertificateRevocationReason
This method returns the revocation reason for the given certificate.- Parameters:
dssCertificateId
- DSS certificate identifier to be checked- Returns:
- revocation reason
-
getErrorMessage
-
getSignatureById
This method returns a signature wrapper for the given signature id- Parameters:
id
- the signature id- Returns:
- a signature wrapper or null
-
getTimestampById
Returns the TimestampWrapper corresponding to the given id.- Parameters:
id
- timestamp id- Returns:
- timestamp wrapper or null
-
getUsedCertificateByIdNullSafe
This method returns a certificate wrapper for the given certificate id- Parameters:
id
- the certificate id- Returns:
- a certificate wrapper (or empty object)
-
getUsedCertificateById
This method returns a certificate wrapper for the given certificate id- Parameters:
id
- the certificate id- Returns:
- a certificate wrapper or null
-
getOrphanCertificateById
This method returns an orphan certificate wrapper for the given certificate id- Parameters:
id
- the certificate id- Returns:
- a orphan certificate wrapper or null
-
getCertificatesFromSource
public List<CertificateWrapper> getCertificatesFromSource(CertificateSourceType certificateSourceType) Returns a list of certificates by their origin source- Parameters:
certificateSourceType
-CertificateSourceType
to get certificates with- Returns:
- list of
CertificateWrapper
s
-
getAllOrphanCertificateObjects
Returns a list of all foundOrphanCertificateWrapper
values- Returns:
- list of
OrphanCertificateWrapper
s
-
getAllOrphanCertificateReferences
Returns a list of all found orphan certificate references- Returns:
- list of
OrphanTokenWrapper
s
-
getAllOrphanRevocationObjects
Returns a list of all foundOrphanRevocationWrapper
values- Returns:
- list of
OrphanRevocationWrapper
s
-
getAllOrphanRevocationReferences
Returns a list of all found orphan revocation references- Returns:
- list of
OrphanRevocationTokenWrapper
s
-
getCrossCertificates
Returns a list of cross-certificates- Parameters:
certificate
-CertificateWrapper
to find cross certificates for- Returns:
- a list of cross certificate
CertificateWrapper
s
-
getOrphanCrossCertificates
public List<OrphanCertificateTokenWrapper> getOrphanCrossCertificates(CertificateWrapper certificate) Returns a list of orphan cross-certificates- Parameters:
certificate
-CertificateWrapper
to find cross certificates for- Returns:
- a list of
OrphanCertificateTokenWrapper
s
-
getEquivalentCertificates
Returns a list of equivalent certificates (certificates with the same public key)- Parameters:
certificate
-CertificateWrapper
to find equivalent certificates for- Returns:
- a list of equivalent certificates
-
getOrphanEquivalentCertificates
public List<OrphanCertificateTokenWrapper> getOrphanEquivalentCertificates(CertificateWrapper certificate) Returns a list of orphan equivalent certificates (certificates with the same public key)- Parameters:
certificate
-CertificateWrapper
to find equivalent certificates for- Returns:
- a list of orphan equivalent certificates
-
getSignatures
This method retrieves a list of signature wrappers.- Returns:
- a list of
SignatureWrapper
s.
-
getTimestampList
This method retrieves a list of timestamp wrappers- Returns:
- a list of timestamp wrappers
-
getNonEvidenceRecordTimestamps
Returns a list of time-stamp tokens which are not evidence record time-stamps- Returns:
- a list of
TimestampWrapper
s
-
getEvidenceRecords
This method retrieves a list of evidence record wrappers- Returns:
- a list of evidence record wrappers
-
getEvidenceRecordById
Returns the EvidenceRecordWrapper corresponding to the given id.- Parameters:
id
- evidence record id- Returns:
- evidence record wrapper or null
-
getUsedCertificates
This method retrieves a list of certificate wrappers- Returns:
- a list of
CertificateWrapper
s.
-
getAllSignatures
This method returns signatures (not countersignatures)- Returns:
- a set of SignatureWrapper
-
getAllCounterSignatures
This method returns counter-signatures (not signatures)- Returns:
- a set of SignatureWrapper
-
getAllCounterSignaturesForMasterSignature
public Set<SignatureWrapper> getAllCounterSignaturesForMasterSignature(SignatureWrapper masterSignatureWrapper) Returns a set ofSignatureWrapper
s for a givenmasterSignatureWrapper
- Parameters:
masterSignatureWrapper
- -SignatureWrapper
to get counter signatures for- Returns:
- set of
SignatureWrapper
s
-
getAllRevocationData
This method returns all revocation data- Returns:
- a set of revocation data
-
getLatestRevocationDataForCertificate
public CertificateRevocationWrapper getLatestRevocationDataForCertificate(CertificateWrapper certificate) Returns the last actual revocation for the givencertificate
- Parameters:
certificate
-CertificateWrapper
to find the latest revocation for- Returns:
CertificateRevocationWrapper
revocation
-
getCertificateById
ReturnsCertificateWrapper
with the givenid
- Parameters:
id
-String
identifier to getCertificateWrapper
with- Returns:
CertificateWrapper
-
getRevocationById
ReturnsRevocationWrapper
with the givenid
- Parameters:
id
-String
identifier to getRevocationWrapper
with- Returns:
RevocationWrapper
-
getOriginalSignerDocuments
Returns a complete list of original signer documents signed by all signatures- Returns:
- list of
SignerDataWrapper
s
-
getAllSignerDocuments
This method returns a list of all covered documents, including the ones covering by timestamp(s), when applicable- Returns:
- list of
SignerDataWrapper
s
-
getJaxbModel
This method returns the JAXB model- Returns:
- the jaxb model of the diagnostic data
-
isContainerInfoPresent
public boolean isContainerInfoPresent()This method checks if the document is a container (ASiC)- Returns:
- true if the document is a container
-
getContainerType
This method returns the container type- Returns:
- the container type (ASiC-S/E)
-
getZipComment
This method returns the zip comment (if the document is a container)- Returns:
- the zip comment for the current document (if container) or null
-
isMimetypeFilePresent
public boolean isMimetypeFilePresent()This method checks if the container has a mimetype file- Returns:
- true if the mimetype file is present
-
getMimetypeFileContent
This method returns the content of the mimetype file (if container)- Returns:
- the content of the mimetype file
-
getContainerInfo
Returns information about ASiC container (when applicable)- Returns:
XmlContainerInfo
-
isPDFAValidationPerformed
public boolean isPDFAValidationPerformed()Returns whether a document has been validated against PDF/A compliance- Returns:
- TRUE if the PDF/A validation has been performed, FALSE otherwise
-
getPDFAProfileId
-
isPDFACompliant
public boolean isPDFACompliant()Returns whether the document is a PDF/A compliant (PDF/A validation shall be performed!)- Returns:
- TRUE if the document is PDF/A compliant, FALSE otherwise
-
getPDFAValidationErrors
Returns a collection of PDF/A validation errors occurred during the validation- Returns:
- a collection of
String
s
-
getTrustedLists
This method returns the JAXB model of the used trusted lists- Returns:
- the JAXB model of the used trusted lists
-
getListOfTrustedLists
This method returns the JAXB model of the LOTL- Returns:
- the JAXB model of the LOTL
-
getValidationDate
-