Package eu.europa.esig.dss.validation
Class DefaultAdvancedSignature
java.lang.Object
eu.europa.esig.dss.validation.DefaultAdvancedSignature
- All Implemented Interfaces:
AdvancedSignature
,Serializable
- Direct Known Subclasses:
CAdESSignature
,XAdESSignature
public abstract class DefaultAdvancedSignature extends Object implements AdvancedSignature
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAdvancedSignature.ValidationDataForInclusion
-
Field Summary
Fields Modifier and Type Field Description protected CandidatesForSigningCertificate
candidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate.protected CertificatePool
certPool
This is the reference to the global (external) pool of certificates.protected List<DSSDocument>
detachedContents
In case of a detached signature this is the signed document.protected List<ManifestFile>
manifestFiles
In case of a ASiC-E signature this is the list of found manifest files.protected SignatureCertificateSource
offlineCertificateSource
protected CertificateToken
providedSigningCertificateToken
In the case of a non AdES signature the signing certificate is not mandatory within the signature and can be provided by the driving application.protected List<ReferenceValidation>
referenceValidations
This variable contains a list of reference validations (reference tag for XAdES or message-digest for CAdES)protected SignatureCRLSource
signatureCRLSource
protected SignatureCryptographicVerification
signatureCryptographicVerification
This variable contains the result of the signature mathematical validation.protected SignatureIdentifier
signatureIdentifier
protected SignatureOCSPSource
signatureOCSPSource
protected SignaturePolicy
signaturePolicy
protected SignatureTimestampSource
signatureTimestampSource
protected String
structureValidation
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultAdvancedSignature(CertificatePool certPool)
-
Method Summary
Modifier and Type Method Description protected void
addEncapsulatedCertificatesFromTimestamp(List<TimestampedReference> references, TimestampToken timestampedTimestamp)
void
addExternalTimestamp(TimestampToken timestamp)
This method allows to add an external timestamp.protected void
addReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd)
AddsreferenceToAdd
toreferenceList
without duplicatesprotected void
addReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd)
AddsreferencesToAdd
toreferenceList
without duplicatesprotected void
addReferencesForCertificates(List<TimestampedReference> references)
protected void
addReferencesForPreviousTimestamps(List<TimestampedReference> references, List<TimestampToken> timestampedTimestamps)
protected void
addReferencesFromRevocationData(List<TimestampedReference> references)
This method adds references to retrieved revocation data.boolean
areAllSelfSignedCertificates()
Checks if all certificate chains present in the signature are self-signedprotected abstract SignatureIdentifier
buildSignatureIdentifier()
Build and definessignatureIdentifier
valueboolean
equals(Object obj)
List<RevocationRef>
findRefsForRevocationIdentifier(EncapsulatedRevocationTokenIdentifier revocationIdentifier)
Retrieves a list of foundRevocationRef
s for the givenrevocationIdentifier
List<RevocationRef>
findRefsForRevocationToken(RevocationToken revocationToken)
Retrieves a list of foundRevocationRef
s for the givenrevocationToken
void
findSignatureScope(SignatureScopeFinder signatureScopeFinder)
List<EncapsulatedRevocationTokenIdentifier>
getAllFoundRevocationIdentifiers()
Returns a list of allEncapsulatedRevocationTokenIdentifier
s found in CRL and OCSP sourcesSet<RevocationToken>
getAllRevocationTokens()
Retrieves the set of allRevocationToken
s in the signatureList<TimestampToken>
getAllTimestamps()
Returns a list of all timestamps found in the signatureList<TimestampToken>
getArchiveTimestamps()
Returns the archive TimestampsList<CRLRef>
getAttributeRevocationCRLReferences()
Retrieves a list of allCRLRef
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<OCSPRef>
getAttributeRevocationOCSPReferences()
Retrieves a list of allOCSPRef
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<RevocationToken>
getAttributeRevocationTokens()
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<RevocationToken>
getAttributeRevocationValuesTokens()
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' element NOTE: Applicable only for XAdES revocation sourceList<CertificateToken>
getCertificateListWithinSignatureAndTimestamps()
Returns a list of all certificates found into signature and timestampsMap<String,List<CertificateToken>>
getCertificateMapWithinSignatureAndTimestamps(boolean skipLastArchiveTimestamp)
Returns a map between found certificate chains in signature and timestampsList<CertificateToken>
getCertificates()
Returns an unmodifiable list of all certificate tokens encapsulated in the signatureList<RevocationToken>
getCMSSignedDataRevocationTokens()
Retrieves the list of allRevocationToken
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sourcesListCRLSource
getCompleteCRLSource()
Gets a ListCRLSource representing a merged source fromsignatureCRLSourse
and all included to the signature timestamp objectsListOCSPSource
getCompleteOCSPSource()
Gets a ListOCSPSource representing a merged source fromsignatureOCSPSourse
and all included to the signature timestamp objectsList<CRLRef>
getCompleteRevocationCRLReferences()
Retrieves a list of allCRLRef
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<OCSPRef>
getCompleteRevocationOCSPReferences()
Retrieves a list of allOCSPRef
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<RevocationToken>
getCompleteRevocationTokens()
Retrieves the list of allRevocationToken
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sourcesList<DSSDocument>
getContainerContents()
protected List<TimestampedReference>
getContentTimestampReferences()
List<TimestampToken>
getContentTimestamps()
Returns the content timestampsSignatureLevel
getDataFoundUpToLevel()
List<DSSDocument>
getDetachedContents()
List<TimestampToken>
getDocumentTimestamps()
Returns a list of timestamps defined with the 'DocTimeStamp' type NOTE: applicable only for PAdESList<RevocationToken>
getDSSDictionaryRevocationTokens()
Retrieves the list of allRevocationToken
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation sourceSignatureIdentifier
getDSSId()
This method returns theSignatureIdentifier
.String
getId()
This method returns the DSS unique signature id.List<DSSDocument>
getManifestedDocuments()
AdvancedSignature
getMasterSignature()
byte[]
getMessageDigestValue()
List<CertificateRef>
getOrphanCertificateRefs()
Returns a list of orphan certificate refs, that are not associated to anyCertificateToken
List<RevocationRef>
getOrphanRevocationRefs()
Returns a list of all orphanRevocationRef
s found into the signaturePdfRevision
getPdfRevision()
SignaturePolicy
getPolicyId()
Returns the Signature Policy OID from the signature.CertificateToken
getProvidedSigningCertificateToken()
List<RevocationToken>
getRevocationValuesTokens()
Retrieves the list of allRevocationToken
s present in 'RevocationValues' element NOTE: Applicable only for CAdES and XAdES revocation sourcesSignatureCryptographicVerification
getSignatureCryptographicVerification()
String
getSignatureFilename()
This method returns the signature filename (useful for ASiC and multiple signature files)List<SignatureScope>
getSignatureScopes()
protected List<TimestampedReference>
getSignatureTimestampReferences()
List<TimestampToken>
getSignatureTimestamps()
Returns the signature timestampsValidationContext
getSignatureValidationContext(CertificateVerifier certificateVerifier)
This method validates the signing certificate and all timestamps.List<SignerRole>
getSignerRoles()
Returns the list of roles of the signer.protected List<TimestampedReference>
getSigningCertificateTimestampReferences()
CertificateToken
getSigningCertificateToken()
This method returns the signing certificate token or null if there is no valid signing certificate.String
getStructureValidationResult()
protected List<TimestampedReference>
getTimestampedReferencesFromCertificates(List<CertificateToken> certificateTokens)
Creates a list ofTimestampedReference
s for the providedcertificateTokens
List<CRLRef>
getTimestampRevocationCRLReferences()
Retrieves a list of allCRLRef
s present in a timestamp element NOTE: Applicable only for CAdES revocation sourceList<OCSPRef>
getTimestampRevocationOCSPReferences()
Retrieves a list of allOCSPRef
s present in a timestamp element NOTE: Applicable only for CAdES revocation sourceList<RevocationToken>
getTimestampSignedDataRevocationTokens()
Retrieves the list of allRevocationToken
s present in the Timestamp token SignedData NOTE: Applicable only for CAdES revocation sourcesList<CertificateToken>
getTimestampSourceCertificates()
Returns a list ofCertificateToken
s found in theSignatureTimestampSource
List<TimestampToken>
getTimestampsX1()
Returns the time-stamp which is placed on the digital signature (XAdES example: ds:SignatureValue element), the signature time-stamp(s) present in the AdES-T form, the certification path references and the revocation status references.List<TimestampToken>
getTimestampsX2()
Returns the time-stamp which is computed over the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).List<RevocationToken>
getTimestampValidationDataTokens()
Retrieves the list of allRevocationToken
s present in 'TimestampValidationData/RevocationValues' element NOTE: Applicable only for XAdES revocation sourceDefaultAdvancedSignature.ValidationDataForInclusion
getValidationDataForInclusion(ValidationContext validationContext)
This method returns all validation data to be included into the signatureList<RevocationToken>
getVRIDictionaryRevocationTokens()
Retrieves the list of allRevocationToken
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation sourceint
hashCode()
boolean
hasLTAProfile()
boolean
hasLTProfile()
boolean
hasTProfile()
boolean
isDocHashOnlyValidation()
Returns true if the validation of the signature has been performed only on Signer's Document Representation (SDR).boolean
isHashOnlyValidation()
Returns true if the validation of the signature has been performed only on Data To Be Signed Representation (DTBSR).void
prepareTimestamps(ValidationContext validationContext)
This method adds to theValidationContext
all timestamps to be validated.void
setContainerContents(List<DSSDocument> containerContents)
This method allows to set the container contents in the case of ASiC signature.void
setDetachedContents(List<DSSDocument> detachedContents)
This method allows to set the signed contents in the case of the detached signature.void
setManifestFiles(List<ManifestFile> manifestFiles)
This method allows to set the manifest files in the case of ASiC-E signature.void
setMasterSignature(AdvancedSignature masterSignature)
This setter allows to indicate the master signature.void
setProvidedSigningCertificateToken(CertificateToken certificateToken)
This method allows to provide a signing certificate to be used in the validation process.void
setSignatureFilename(String signatureFilename)
This method allows to set the signature filename (useful in case of ASiC)void
validateStructure()
This method allows the structure validation of the signature.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.validation.AdvancedSignature
checkSignatureIntegrity, checkSignaturePolicy, checkSigningCertificate, getCandidatesForSigningCertificate, getCertificateRefs, getCertificateSource, getCertifiedSignerRoles, getClaimedSignerRoles, getCommitmentTypeIndication, getContentHints, getContentIdentifier, getContentType, getCounterSignatures, getCRLSource, getDAIdentifier, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getMimeType, getOCSPSource, getReferenceValidations, getSignatureAlgorithm, getSignatureDigestReference, getSignatureForm, getSignatureLevels, getSignatureProductionPlace, getSignatureValue, getSigningTime, getTimestampSource, isDataForSignatureLevelPresent
-
Field Details
-
certPool
This is the reference to the global (external) pool of certificates. All encapsulated certificates in the signature are added to this pool. SeeCertificatePool
-
providedSigningCertificateToken
In the case of a non AdES signature the signing certificate is not mandatory within the signature and can be provided by the driving application. -
detachedContents
In case of a detached signature this is the signed document. -
manifestFiles
In case of a ASiC-E signature this is the list of found manifest files. -
referenceValidations
This variable contains a list of reference validations (reference tag for XAdES or message-digest for CAdES) -
signatureCryptographicVerification
This variable contains the result of the signature mathematical validation. It is initialised when the methodcheckSignatureIntegrity
is called. -
structureValidation
-
candidatesForSigningCertificate
The reference to the object containing all candidates to the signing certificate. -
offlineCertificateSource
-
signatureCRLSource
-
signatureOCSPSource
-
signatureTimestampSource
-
signaturePolicy
-
signatureIdentifier
-
-
Constructor Details
-
DefaultAdvancedSignature
- Parameters:
certPool
- can be null
-
-
Method Details
-
buildSignatureIdentifier
Build and definessignatureIdentifier
value -
getSignatureFilename
Description copied from interface:AdvancedSignature
This method returns the signature filename (useful for ASiC and multiple signature files)- Specified by:
getSignatureFilename
in interfaceAdvancedSignature
- Returns:
- the signature filename
-
setSignatureFilename
Description copied from interface:AdvancedSignature
This method allows to set the signature filename (useful in case of ASiC)- Specified by:
setSignatureFilename
in interfaceAdvancedSignature
-
getDetachedContents
- Specified by:
getDetachedContents
in interfaceAdvancedSignature
- Returns:
- in the case of the detached signature this is the
List
of signed contents.
-
setDetachedContents
Description copied from interface:AdvancedSignature
This method allows to set the signed contents in the case of the detached signature.- Specified by:
setDetachedContents
in interfaceAdvancedSignature
- Parameters:
detachedContents
-List
ofDSSDocument
representing the signed detached contents.
-
getContainerContents
- Specified by:
getContainerContents
in interfaceAdvancedSignature
- Returns:
- in case of ASiC signature returns a list of container documents
-
setContainerContents
Description copied from interface:AdvancedSignature
This method allows to set the container contents in the case of ASiC signature.- Specified by:
setContainerContents
in interfaceAdvancedSignature
- Parameters:
containerContents
-List
ofDSSDocument
representing the container contents.
-
setManifestFiles
Description copied from interface:AdvancedSignature
This method allows to set the manifest files in the case of ASiC-E signature.- Specified by:
setManifestFiles
in interfaceAdvancedSignature
- Parameters:
manifestFiles
-List
ofManifestFile
s
-
getOrphanCertificateRefs
Description copied from interface:AdvancedSignature
Returns a list of orphan certificate refs, that are not associated to anyCertificateToken
- Specified by:
getOrphanCertificateRefs
in interfaceAdvancedSignature
- Returns:
- list of found
CertificateRef
s
-
getDSSId
Description copied from interface:AdvancedSignature
This method returns theSignatureIdentifier
.- Specified by:
getDSSId
in interfaceAdvancedSignature
- Returns:
- unique
SignatureIdentifier
-
getId
Description copied from interface:AdvancedSignature
This method returns the DSS unique signature id. It allows to unambiguously identify each signature.- Specified by:
getId
in interfaceAdvancedSignature
- Returns:
- The signature unique Id
-
getManifestedDocuments
- Specified by:
getManifestedDocuments
in interfaceAdvancedSignature
- Returns:
- in case of ASiC-E signature returns a list of
DSSDocument
s contained in the related signature manifest
-
getDataFoundUpToLevel
- Specified by:
getDataFoundUpToLevel
in interfaceAdvancedSignature
- Returns:
- the upper level for which data have been found. Doesn't mean any validity of the data found. Null if unknown.
-
getCompleteCRLSource
Description copied from interface:AdvancedSignature
Gets a ListCRLSource representing a merged source fromsignatureCRLSourse
and all included to the signature timestamp objects- Specified by:
getCompleteCRLSource
in interfaceAdvancedSignature
- Returns:
ListCRLSource
-
getCompleteOCSPSource
Description copied from interface:AdvancedSignature
Gets a ListOCSPSource representing a merged source fromsignatureOCSPSourse
and all included to the signature timestamp objects- Specified by:
getCompleteOCSPSource
in interfaceAdvancedSignature
- Returns:
ListOCSPSource
-
getSignatureValidationContext
This method validates the signing certificate and all timestamps.- Returns:
- signature validation context containing all certificates and revocation data used during the validation process.
-
getCertificates
Returns an unmodifiable list of all certificate tokens encapsulated in the signature- Specified by:
getCertificates
in interfaceAdvancedSignature
- Returns:
- a list of certificate contained within the signature
- See Also:
AdvancedSignature.getCertificates()
-
getTimestampSourceCertificates
Returns a list ofCertificateToken
s found in theSignatureTimestampSource
- Returns:
- list of
CertificateToken
s
-
getValidationDataForInclusion
public DefaultAdvancedSignature.ValidationDataForInclusion getValidationDataForInclusion(ValidationContext validationContext)This method returns all validation data to be included into the signature- Parameters:
validationContext
-ValidationContext
contained all extracted data during the validation- Returns:
DefaultAdvancedSignature.ValidationDataForInclusion
all validation data to be included to the signature excluding duplicates and cross-certificates
-
getCertificateListWithinSignatureAndTimestamps
Description copied from interface:AdvancedSignature
Returns a list of all certificates found into signature and timestamps- Specified by:
getCertificateListWithinSignatureAndTimestamps
in interfaceAdvancedSignature
- Returns:
- list of
CertificateToken
s
-
getCertificateMapWithinSignatureAndTimestamps
public Map<String,List<CertificateToken>> getCertificateMapWithinSignatureAndTimestamps(boolean skipLastArchiveTimestamp)Returns a map between found certificate chains in signature and timestamps- Parameters:
skipLastArchiveTimestamp
- - if chain for the last archive timestamp must not be included to the final map- Returns:
- map between signature/timestamp instances and their certificate chains
-
setMasterSignature
Description copied from interface:AdvancedSignature
This setter allows to indicate the master signature. It means that this is a countersignature.- Specified by:
setMasterSignature
in interfaceAdvancedSignature
- Parameters:
masterSignature
-AdvancedSignature
-
getMasterSignature
- Specified by:
getMasterSignature
in interfaceAdvancedSignature
- Returns:
AdvancedSignature
-
getSignatureCryptographicVerification
- Specified by:
getSignatureCryptographicVerification
in interfaceAdvancedSignature
- Returns:
- SignatureCryptographicVerification with all the information collected during the validation process.
-
getSignerRoles
Description copied from interface:AdvancedSignature
Returns the list of roles of the signer.- Specified by:
getSignerRoles
in interfaceAdvancedSignature
- Returns:
- list of the
SignerRole
s
-
getProvidedSigningCertificateToken
- Specified by:
getProvidedSigningCertificateToken
in interfaceAdvancedSignature
- Returns:
- This method returns the provided signing certificate or
null
-
setProvidedSigningCertificateToken
Description copied from interface:AdvancedSignature
This method allows to provide a signing certificate to be used in the validation process. It can happen in the case of a non-AdES signature without the signing certificate within the signature.- Specified by:
setProvidedSigningCertificateToken
in interfaceAdvancedSignature
- Parameters:
certificateToken
-CertificateToken
representing the signing certificate token.
-
getSigningCertificateToken
Description copied from interface:AdvancedSignature
This method returns the signing certificate token or null if there is no valid signing certificate. Note that to determinate the signing certificate the signature must be validated: the methodcheckSignatureIntegrity
must be called.- Specified by:
getSigningCertificateToken
in interfaceAdvancedSignature
- Returns:
-
prepareTimestamps
This method adds to theValidationContext
all timestamps to be validated.- Specified by:
prepareTimestamps
in interfaceAdvancedSignature
- Parameters:
validationContext
-ValidationContext
to which the timestamps must be added
-
validateStructure
public void validateStructure()Description copied from interface:AdvancedSignature
This method allows the structure validation of the signature.- Specified by:
validateStructure
in interfaceAdvancedSignature
-
getStructureValidationResult
- Specified by:
getStructureValidationResult
in interfaceAdvancedSignature
-
getContentTimestampReferences
-
getSignatureTimestampReferences
-
getSigningCertificateTimestampReferences
-
addReferencesForPreviousTimestamps
protected void addReferencesForPreviousTimestamps(List<TimestampedReference> references, List<TimestampToken> timestampedTimestamps) -
addEncapsulatedCertificatesFromTimestamp
protected void addEncapsulatedCertificatesFromTimestamp(List<TimestampedReference> references, TimestampToken timestampedTimestamp) -
addReferencesForCertificates
-
getTimestampedReferencesFromCertificates
protected List<TimestampedReference> getTimestampedReferencesFromCertificates(List<CertificateToken> certificateTokens)Creates a list ofTimestampedReference
s for the providedcertificateTokens
- Parameters:
certificateTokens
- list ofCertificateToken
s to create timestamped references for- Returns:
- list of
TimestampedReference
s
-
addReferencesFromRevocationData
This method adds references to retrieved revocation data.- Parameters:
references
-
-
addReference
protected void addReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd)AddsreferenceToAdd
toreferenceList
without duplicates- Parameters:
referenceList
- - list ofTimestampedReference
s to be extendedreferenceToAdd
- -TimestampedReference
to be added
-
addReferences
protected void addReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd)AddsreferencesToAdd
toreferenceList
without duplicates- Parameters:
referenceList
- - list ofTimestampedReference
s to be extendedreferencesToAdd
- -TimestampedReference
s to be added
-
getPolicyId
Description copied from interface:AdvancedSignature
Returns the Signature Policy OID from the signature.- Specified by:
getPolicyId
in interfaceAdvancedSignature
- Returns:
SignaturePolicy
-
findSignatureScope
- Specified by:
findSignatureScope
in interfaceAdvancedSignature
-
getSignatureScopes
- Specified by:
getSignatureScopes
in interfaceAdvancedSignature
-
getContentTimestamps
Description copied from interface:AdvancedSignature
Returns the content timestamps- Specified by:
getContentTimestamps
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
-
getSignatureTimestamps
Description copied from interface:AdvancedSignature
Returns the signature timestamps- Specified by:
getSignatureTimestamps
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
-
getTimestampsX1
Description copied from interface:AdvancedSignature
Returns the time-stamp which is placed on the digital signature (XAdES example: ds:SignatureValue element), the signature time-stamp(s) present in the AdES-T form, the certification path references and the revocation status references.- Specified by:
getTimestampsX1
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
-
getTimestampsX2
Description copied from interface:AdvancedSignature
Returns the time-stamp which is computed over the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).- Specified by:
getTimestampsX2
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
-
getArchiveTimestamps
Description copied from interface:AdvancedSignature
Returns the archive Timestamps- Specified by:
getArchiveTimestamps
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
s
-
getDocumentTimestamps
Description copied from interface:AdvancedSignature
Returns a list of timestamps defined with the 'DocTimeStamp' type NOTE: applicable only for PAdES- Specified by:
getDocumentTimestamps
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
s
-
getAllTimestamps
Description copied from interface:AdvancedSignature
Returns a list of all timestamps found in the signature- Specified by:
getAllTimestamps
in interfaceAdvancedSignature
- Returns:
List
ofTimestampToken
s
-
addExternalTimestamp
Description copied from interface:AdvancedSignature
This method allows to add an external timestamp. The given timestamp must be processed before.- Specified by:
addExternalTimestamp
in interfaceAdvancedSignature
- Parameters:
timestamp
- the timestamp token
-
hasTProfile
public boolean hasTProfile() -
hasLTProfile
public boolean hasLTProfile() -
areAllSelfSignedCertificates
public boolean areAllSelfSignedCertificates()Description copied from interface:AdvancedSignature
Checks if all certificate chains present in the signature are self-signed- Specified by:
areAllSelfSignedCertificates
in interfaceAdvancedSignature
- Returns:
- TRUE if all certificates are self-signed, false otherwise
-
hasLTAProfile
public boolean hasLTAProfile() -
getAllRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the set of allRevocationToken
s in the signature- Specified by:
getAllRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getCMSSignedDataRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in the CMS SignedData NOTE: Applicable only for CAdES revocation sources- Specified by:
getCMSSignedDataRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getTimestampSignedDataRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in the Timestamp token SignedData NOTE: Applicable only for CAdES revocation sources- Specified by:
getTimestampSignedDataRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getRevocationValuesTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'RevocationValues' element NOTE: Applicable only for CAdES and XAdES revocation sources- Specified by:
getRevocationValuesTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getAttributeRevocationValuesTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationValues' element NOTE: Applicable only for XAdES revocation source- Specified by:
getAttributeRevocationValuesTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getTimestampValidationDataTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'TimestampValidationData/RevocationValues' element NOTE: Applicable only for XAdES revocation source- Specified by:
getTimestampValidationDataTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getDSSDictionaryRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'DSS' dictionary NOTE: Applicable only for PAdES revocation source- Specified by:
getDSSDictionaryRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getVRIDictionaryRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'VRI' dictionary NOTE: Applicable only for PAdES revocation source- Specified by:
getVRIDictionaryRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getCompleteRevocationCRLReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allCRLRef
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getCompleteRevocationCRLReferences
in interfaceAdvancedSignature
- Returns:
- list of
CRLRef
s
-
getAttributeRevocationCRLReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allCRLRef
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getAttributeRevocationCRLReferences
in interfaceAdvancedSignature
- Returns:
- list of
CRLRef
s
-
getTimestampRevocationCRLReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allCRLRef
s present in a timestamp element NOTE: Applicable only for CAdES revocation source- Specified by:
getTimestampRevocationCRLReferences
in interfaceAdvancedSignature
- Returns:
- list of
CRLRef
s
-
getCompleteRevocationOCSPReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allOCSPRef
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getCompleteRevocationOCSPReferences
in interfaceAdvancedSignature
- Returns:
- list of
OCSPRef
s
-
getAttributeRevocationOCSPReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allOCSPRef
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getAttributeRevocationOCSPReferences
in interfaceAdvancedSignature
- Returns:
- list of
OCSPRef
s
-
getTimestampRevocationOCSPReferences
Description copied from interface:AdvancedSignature
Retrieves a list of allOCSPRef
s present in a timestamp element NOTE: Applicable only for CAdES revocation source- Specified by:
getTimestampRevocationOCSPReferences
in interfaceAdvancedSignature
- Returns:
- list of
OCSPRef
s
-
getOrphanRevocationRefs
Description copied from interface:AdvancedSignature
Returns a list of all orphanRevocationRef
s found into the signature- Specified by:
getOrphanRevocationRefs
in interfaceAdvancedSignature
- Returns:
- list of
RevocationRef
s
-
getCompleteRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'CompleteRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getCompleteRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
getAttributeRevocationTokens
Description copied from interface:AdvancedSignature
Retrieves the list of allRevocationToken
s present in 'AttributeRevocationRefs' element NOTE: Applicable only for XAdES and CAdES revocation sources- Specified by:
getAttributeRevocationTokens
in interfaceAdvancedSignature
- Returns:
- list of
RevocationToken
s
-
findRefsForRevocationToken
Description copied from interface:AdvancedSignature
Retrieves a list of foundRevocationRef
s for the givenrevocationToken
- Specified by:
findRefsForRevocationToken
in interfaceAdvancedSignature
- Parameters:
revocationToken
-RevocationToken
to get references for- Returns:
- list of
RevocationRef
s
-
findRefsForRevocationIdentifier
public List<RevocationRef> findRefsForRevocationIdentifier(EncapsulatedRevocationTokenIdentifier revocationIdentifier)Description copied from interface:AdvancedSignature
Retrieves a list of foundRevocationRef
s for the givenrevocationIdentifier
- Specified by:
findRefsForRevocationIdentifier
in interfaceAdvancedSignature
- Parameters:
revocationIdentifier
-EncapsulatedRevocationTokenIdentifier
to get references for- Returns:
- list of
RevocationRef
s
-
getAllFoundRevocationIdentifiers
Description copied from interface:AdvancedSignature
Returns a list of allEncapsulatedRevocationTokenIdentifier
s found in CRL and OCSP sources- Specified by:
getAllFoundRevocationIdentifiers
in interfaceAdvancedSignature
- Returns:
- list of all
EncapsulatedRevocationTokenIdentifier
s
-
isDocHashOnlyValidation
public boolean isDocHashOnlyValidation()Description copied from interface:AdvancedSignature
Returns true if the validation of the signature has been performed only on Signer's Document Representation (SDR). (An SDR typically is built on a cryptographic hash of the Signer's Document)- Specified by:
isDocHashOnlyValidation
in interfaceAdvancedSignature
- Returns:
- true of it is DocHashOnly validation, false otherwise
-
isHashOnlyValidation
public boolean isHashOnlyValidation()Description copied from interface:AdvancedSignature
Returns true if the validation of the signature has been performed only on Data To Be Signed Representation (DTBSR). EN 319 102-1 v1.1.1 (4.2.8 Data to be signed representation (DTBSR)): The DTBS preparation component shall take the DTBSF and hash it according to the hash algorithm specified in the cryptographic suite. The result of this process is the DTBSR, which is then used to create the signature. NOTE: In order for the produced hash to be representative of the DTBSF, the hashing function has the property that it is computationally infeasible to find collisions for the expected signature lifetime. Should the hash function become weak in the future, additional security measures, such as applying time-stamp tokens, can be taken.- Specified by:
isHashOnlyValidation
in interfaceAdvancedSignature
- Returns:
- true of it is HashOnly validation, false otherwise
-
getMessageDigestValue
public byte[] getMessageDigestValue()- Specified by:
getMessageDigestValue
in interfaceAdvancedSignature
-
getPdfRevision
- Specified by:
getPdfRevision
in interfaceAdvancedSignature
-
equals
-
hashCode
public int hashCode()
-