Class PAdESSignature
java.lang.Object
eu.europa.esig.dss.validation.DefaultAdvancedSignature
eu.europa.esig.dss.cades.validation.CAdESSignature
eu.europa.esig.dss.pades.validation.PAdESSignature
- All Implemented Interfaces:
AdvancedSignature
,Serializable
public class PAdESSignature extends CAdESSignature
Implementation of AdvancedSignature for PAdES
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature
counterSignatures, detachedContents, manifestFile, offlineCertificateSource, referenceValidations, signatureCRLSource, signatureCryptographicVerification, signatureIdentifier, signatureOCSPSource, signaturePolicy, signatureTimestampSource, signingCertificateSource, structureValidationMessages
-
Constructor Summary
Constructors Modifier Constructor Description protected
PAdESSignature(PdfSignatureRevision pdfSignatureRevision, List<PdfRevision> documentRevisions)
The default constructor for PAdESSignature. -
Method Summary
Modifier and Type Method Description SignatureCertificateSource
getCertificateSource()
Gets a certificate source which contains ALL certificates embedded in the signature.String
getContentHints()
Gets Content HintsString
getContentIdentifier()
Gets ContentIdentifier StringList<AdvancedSignature>
getCounterSignatures()
Returns a list of counter signatures applied to this signatureOfflineCRLSource
getCRLSource()
Gets a CRL source which contains ALL CRLs embedded in the signature.SignatureLevel
getDataFoundUpToLevel()
This method returns the signature levelPdfDssDict
getDssDictionary()
Gets the last DSS dictionary for the signatureOfflineOCSPSource
getOCSPSource()
Gets an OCSP source which contains ALL OCSP responses embedded in the signature.PdfSignatureRevision
getPdfRevision()
Retrieves a PdfRevision (PAdES) related to the current signaturePdfSignatureDictionary
getPdfSignatureDictionary()
Gets thePdfSignatureDictionary
SignatureDigestReference
getSignatureDigestReference(DigestAlgorithm digestAlgorithm)
TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch. 5.1.4.2.1.3 XML component: In case of PAdES signatures, the input of the digest value computation shall be the result of decoding the hexadecimal string present within the Contents field of the Signature PDF dictionary enclosing one PAdES digital signature.SignatureForm
getSignatureForm()
Specifies the format of the signatureprotected SignatureIdentifierBuilder
getSignatureIdentifierBuilder()
Returns a builder to define and build a signature IdDate
getSigningTime()
Returns the signing time included within the signature.PAdESTimestampSource
getTimestampSource()
Gets a Signature Timestamp source which contains ALL timestamps embedded in the signature.String
getVRIKey()
Name of the related to the signature VRI dictionaryboolean
hasLTAProfile()
Checks if the LTA-level is present in the signatureboolean
hasTProfile()
Checks if the T-level is present in the signatureMethods inherited from class eu.europa.esig.dss.cades.validation.CAdESSignature
checkSignatureIntegrity, getCertifiedSignerRoles, getClaimedSignerRoles, getCmsSignedData, getCommitmentTypeIndications, getContentType, getCounterSignatureStore, getDAIdentifier, getDataToBeSignedRepresentation, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getMessageDigestAlgorithms, getMessageDigestValue, getMimeType, getOriginalDocument, getReferenceValidations, getReferenceValidations, getSignatureAlgorithm, getSignaturePolicy, getSignaturePolicyStore, getSignatureProductionPlace, getSignatureValue, getSignedAssertions, getSignerId, getSignerInformation, getSignerInformationStoreInfos, hasAProfile, hasBProfile, hasCProfile, hasXProfile, isCounterSignature
Methods inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature
addExternalTimestamp, areAllSelfSignedCertificates, equals, findSignatureScope, getAllTimestamps, getArchiveTimestamps, getCandidatesForSigningCertificate, getCertificates, getCertificateSourcesExceptLastArchiveTimestamp, getCompleteCertificateSource, getCompleteCRLSource, getCompleteOCSPSource, getContainerContents, getContentTimestamps, getCounterSignaturesCertificateSource, getCounterSignaturesCRLSource, getCounterSignaturesOCSPSource, getDetachedContents, getDocumentTimestamps, getDSSId, getId, getManifestFile, getMasterSignature, getSignatureCryptographicVerification, getSignatureFilename, getSignatureScopes, getSignatureTimestamps, getSignatureValidationContext, getSignerRoles, getSigningCertificateToken, getStructureValidationResult, getTimestampsX1, getTimestampsX2, hashCode, hasLTProfile, isDocHashOnlyValidation, isHashOnlyValidation, prepareCounterSignatures, prepareOfflineCertificateVerifier, prepareTimestamps, resetCertificateSource, resetRevocationSources, resetTimestampSource, setContainerContents, setDetachedContents, setManifestFile, setMasterSignature, setSignatureFilename, setSigningCertificateSource, toString, validateStructure
-
Constructor Details
-
PAdESSignature
protected PAdESSignature(PdfSignatureRevision pdfSignatureRevision, List<PdfRevision> documentRevisions)The default constructor for PAdESSignature.- Parameters:
pdfSignatureRevision
- a relatedPdfSignatureRevision
documentRevisions
- a list ofPdfRevision
extracted from the validating document
-
-
Method Details
-
getSignatureForm
Description copied from interface:AdvancedSignature
Specifies the format of the signature- Specified by:
getSignatureForm
in interfaceAdvancedSignature
- Overrides:
getSignatureForm
in classCAdESSignature
- Returns:
SignatureForm
-
getCertificateSource
Description copied from interface:AdvancedSignature
Gets a certificate source which contains ALL certificates embedded in the signature.- Specified by:
getCertificateSource
in interfaceAdvancedSignature
- Overrides:
getCertificateSource
in classCAdESSignature
- Returns:
SignatureCertificateSource
-
getCRLSource
Description copied from interface:AdvancedSignature
Gets a CRL source which contains ALL CRLs embedded in the signature.- Specified by:
getCRLSource
in interfaceAdvancedSignature
- Overrides:
getCRLSource
in classCAdESSignature
- Returns:
OfflineRevocationSource
-
getOCSPSource
Description copied from interface:AdvancedSignature
Gets an OCSP source which contains ALL OCSP responses embedded in the signature.- Specified by:
getOCSPSource
in interfaceAdvancedSignature
- Overrides:
getOCSPSource
in classCAdESSignature
- Returns:
OfflineRevocationSource
-
getTimestampSource
Description copied from interface:AdvancedSignature
Gets a Signature Timestamp source which contains ALL timestamps embedded in the signature.- Specified by:
getTimestampSource
in interfaceAdvancedSignature
- Overrides:
getTimestampSource
in classCAdESSignature
- Returns:
SignatureTimestampSource
-
getSigningTime
Description copied from interface:AdvancedSignature
Returns the signing time included within the signature.- Specified by:
getSigningTime
in interfaceAdvancedSignature
- Overrides:
getSigningTime
in classCAdESSignature
- Returns:
Date
representing the signing time or null
-
getContentIdentifier
Description copied from class:CAdESSignature
Gets ContentIdentifier String- Overrides:
getContentIdentifier
in classCAdESSignature
- Returns:
- content identifier as
String
-
getContentHints
Description copied from class:CAdESSignature
Gets Content Hints- Overrides:
getContentHints
in classCAdESSignature
- Returns:
- content hints as
String
-
getCounterSignatures
Description copied from interface:AdvancedSignature
Returns a list of counter signatures applied to this signature- Specified by:
getCounterSignatures
in interfaceAdvancedSignature
- Overrides:
getCounterSignatures
in classCAdESSignature
- Returns:
- a
List
ofAdvancedSignatures
representing the counter signatures
-
getSignatureIdentifierBuilder
Description copied from class:DefaultAdvancedSignature
Returns a builder to define and build a signature Id- Overrides:
getSignatureIdentifierBuilder
in classCAdESSignature
- Returns:
SignatureIdentifierBuilder
-
getSignatureDigestReference
TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch. 5.1.4.2.1.3 XML component: In case of PAdES signatures, the input of the digest value computation shall be the result of decoding the hexadecimal string present within the Contents field of the Signature PDF dictionary enclosing one PAdES digital signature.- Specified by:
getSignatureDigestReference
in interfaceAdvancedSignature
- Overrides:
getSignatureDigestReference
in classCAdESSignature
- Parameters:
digestAlgorithm
-DigestAlgorithm
to use- Returns:
SignatureDigestReference
-
getDataFoundUpToLevel
Description copied from interface:AdvancedSignature
This method returns the signature level- Specified by:
getDataFoundUpToLevel
in interfaceAdvancedSignature
- Overrides:
getDataFoundUpToLevel
in classCAdESSignature
- Returns:
- a value of
SignatureLevel
-
hasTProfile
public boolean hasTProfile()Description copied from class:DefaultAdvancedSignature
Checks if the T-level is present in the signature- Overrides:
hasTProfile
in classDefaultAdvancedSignature
- Returns:
- TRUE if the T-level is present, FALSE otherwise
-
hasLTAProfile
public boolean hasLTAProfile()Description copied from class:DefaultAdvancedSignature
Checks if the LTA-level is present in the signature- Overrides:
hasLTAProfile
in classDefaultAdvancedSignature
- Returns:
- TRUE if the LTA-level is present, FALSE otherwise
-
getDssDictionary
Gets the last DSS dictionary for the signature- Returns:
PdfDssDict
-
getPdfRevision
Retrieves a PdfRevision (PAdES) related to the current signature- Returns:
PdfRevision
-
getPdfSignatureDictionary
Gets thePdfSignatureDictionary
- Returns:
PdfSignatureDictionary
-
getVRIKey
Name of the related to the signature VRI dictionary- Returns:
- related
String
VRI dictionary name
-