public interface AdvancedSignature extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
addExternalTimestamp(TimestampToken timestamp)
This method allows to add an external timestamp.
|
void |
checkSignatureIntegrity()
Verifies the signature integrity; checks if the signed content has not been tampered with.
|
void |
checkSignaturePolicy(SignaturePolicyProvider signaturePolicyDetector) |
void |
checkSigningCertificate()
This method checks the protection of the certificates included within the signature (XAdES: KeyInfo) against the
substitution attack.
|
void |
findSignatureScope(SignatureScopeFinder signatureScopeFinder) |
byte[] |
getArchiveTimestampData(TimestampToken timestampToken,
String canonicalizationMethod)
Archive timestamp seals the data of the signature in a specific order.
|
List<TimestampToken> |
getArchiveTimestamps()
Returns the archive Timestamps
|
CandidatesForSigningCertificate |
getCandidatesForSigningCertificate()
Gets an object containing the signing certificate or information indicating why it is impossible to extract it
from the signature.
|
List<CertificateRef> |
getCertificateRefs()
Retrieve list of certificate ref
|
List<CertificateToken> |
getCertificates()
Get certificates embedded in the signature
|
SignatureCertificateSource |
getCertificateSource()
Gets a certificate source which contains ALL certificates embedded in the signature.
|
List<CertifiedRole> |
getCertifiedSignerRoles()
Returns the certified role of the signer.
|
String[] |
getClaimedSignerRoles()
Returns the claimed role of the signer.
|
CommitmentType |
getCommitmentTypeIndication()
This method obtains the information concerning commitment type indication linked to the signature
|
String |
getContentHints() |
String |
getContentIdentifier() |
byte[] |
getContentTimestampData(TimestampToken timestampToken)
Returns the content timestamp data (timestamped or to be).
|
List<TimestampToken> |
getContentTimestamps()
Returns the content timestamps
|
String |
getContentType()
Returns the content type of the signed data
|
List<AdvancedSignature> |
getCounterSignatures()
Returns a list of counter signatures applied to this signature
|
List<CRLRef> |
getCRLRefs() |
OfflineCRLSource |
getCRLSource()
Gets a CRL source which contains ALL CRLs embedded in the signature.
|
SignatureLevel |
getDataFoundUpToLevel() |
List<DSSDocument> |
getDetachedContents() |
DigestAlgorithm |
getDigestAlgorithm()
Retrieves the digest algorithm used for generating the signature.
|
EncryptionAlgorithm |
getEncryptionAlgorithm()
Retrieves the encryption algorithm used for generating the signature.
|
String |
getId()
This method returns the DSS unique signature id.
|
MaskGenerationFunction |
getMaskGenerationFunction()
Retrieves the mask generation function used for generating the signature.
|
AdvancedSignature |
getMasterSignature() |
List<OCSPRef> |
getOCSPRefs() |
OfflineOCSPSource |
getOCSPSource()
Gets an OCSP source which contains ALL OCSP responses embedded in the signature.
|
SignaturePolicy |
getPolicyId()
Returns the Signature Policy OID from the signature.
|
CertificateToken |
getProvidedSigningCertificateToken() |
SignatureAlgorithm |
getSignatureAlgorithm()
Retrieves the signature algorithm (or cipher) used for generating the signature.
|
SignatureCryptographicVerification |
getSignatureCryptographicVerification() |
String |
getSignatureFilename()
This method returns the signature filename (useful for ASiC and multiple signature files)
|
SignatureForm |
getSignatureForm()
Specifies the format of the signature
|
SignatureLevel[] |
getSignatureLevels() |
SignatureProductionPlace |
getSignatureProductionPlace()
Returns information about the place where the signature was generated
|
List<SignatureScope> |
getSignatureScopes() |
byte[] |
getSignatureTimestampData(TimestampToken timestampToken,
String canonicalizationMethod)
Returns the data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.
|
List<TimestampToken> |
getSignatureTimestamps()
Returns the signature timestamps
|
CertificateToken |
getSigningCertificateToken()
This method returns the signing certificate token or null if there is no valid signing certificate.
|
Date |
getSigningTime()
Returns the signing time included within the signature.
|
String |
getStructureValidationResult() |
List<TimestampReference> |
getTimestampedReferences()
Returns the
List of TimestampReference representing digest value of the certification path
references and the revocation status references. |
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).
|
byte[] |
getTimestampX1Data(TimestampToken timestampToken,
String canonicalizationMethod)
Returns the data to be time-stamped.
|
byte[] |
getTimestampX2Data(TimestampToken timestampToken,
String canonicalizationMethod)
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and
CompleteRevocationRefs elements (XAdES example).
|
Set<DigestAlgorithm> |
getUsedCertificatesDigestAlgorithms()
Returns the set of digest algorithms used to build the certificate's digest.
|
boolean |
isDataForSignatureLevelPresent(SignatureLevel signatureLevel) |
void |
prepareTimestamps(ValidationContext validationContext) |
void |
setDetachedContents(List<DSSDocument> detachedContents)
This method allows to set the signed contents in the case of the detached 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.
|
void |
validateTimestamps() |
String getSignatureFilename()
void setSignatureFilename(String signatureFilename)
List<DSSDocument> getDetachedContents()
List of signed contents.void setDetachedContents(List<DSSDocument> detachedContents)
detachedContents - List of DSSDocument representing the signed detached contents.CertificateToken getProvidedSigningCertificateToken()
nullvoid setProvidedSigningCertificateToken(CertificateToken certificateToken)
certificateToken - CertificateToken representing the signing certificate token.SignatureForm getSignatureForm()
SignatureAlgorithm getSignatureAlgorithm()
SignatureAlgorithmEncryptionAlgorithm getEncryptionAlgorithm()
EncryptionAlgorithmDigestAlgorithm getDigestAlgorithm()
DigestAlgorithmMaskGenerationFunction getMaskGenerationFunction()
MaskGenerationFunctionDate getSigningTime()
Date representing the signing time or nullSignatureCertificateSource getCertificateSource()
OfflineCRLSource getCRLSource()
OfflineOCSPSource getOCSPSource()
CandidatesForSigningCertificate getCandidatesForSigningCertificate()
void setMasterSignature(AdvancedSignature masterSignature)
masterSignature - AdvancedSignatureAdvancedSignature getMasterSignature()
AdvancedSignatureCertificateToken getSigningCertificateToken()
checkSignatureIntegrity must be called.void checkSignatureIntegrity()
setProvidedSigningCertificateToken In the case of a detached signature
the signed content must be provided by calling setProvidedSigningCertificateTokenSignatureCryptographicVerification getSignatureCryptographicVerification()
void checkSigningCertificate()
SignaturePolicy getPolicyId()
SignaturePolicySignatureProductionPlace getSignatureProductionPlace()
SignatureProductionPlaceCommitmentType getCommitmentTypeIndication()
CommitmentTypeString getContentType()
StringString getContentIdentifier()
StringString getContentHints()
StringString[] getClaimedSignerRoles()
String arrayList<CertifiedRole> getCertifiedSignerRoles()
List<CertificateToken> getCertificates()
List<TimestampToken> getContentTimestamps()
List of TimestampTokenbyte[] getContentTimestampData(TimestampToken timestampToken)
timestampToken - byte array representing the canonicalized data to be timestampedList<TimestampToken> getSignatureTimestamps()
List of TimestampTokenbyte[] getSignatureTimestampData(TimestampToken timestampToken, String canonicalizationMethod)
timestampToken - canonicalizationMethod - byte array representing the canonicalized data to be timestampedList<TimestampToken> getTimestampsX1()
List of TimestampTokenbyte[] getTimestampX1Data(TimestampToken timestampToken, String canonicalizationMethod)
timestampToken - TimestampToken or null during the creation processcanonicalizationMethod - canonicalization methodbyte array representing the canonicalized data to be timestampedList<TimestampToken> getTimestampsX2()
List of TimestampTokenbyte[] getTimestampX2Data(TimestampToken timestampToken, String canonicalizationMethod)
byte array representing the canonicalized data to be timestampedList<TimestampToken> getArchiveTimestamps()
List of TimestampTokenbyte[] getArchiveTimestampData(TimestampToken timestampToken, String canonicalizationMethod)
timestampToken - null when adding a new archive timestampcanonicalizationMethod - byte array representing the canonicalized data to be timestampedvoid addExternalTimestamp(TimestampToken timestamp)
timestamp - the timestamp tokenList<AdvancedSignature> getCounterSignatures()
List of AdvancedSignatures representing the counter signaturesList<TimestampReference> getTimestampedReferences()
List of TimestampReference representing digest value of the certification path
references and the revocation status references. (XAdES
example: CompleteCertificateRefs and CompleteRevocationRefs elements)List of TimestampReferenceList<CertificateRef> getCertificateRefs()
List of CertificateRefString getId()
Set<DigestAlgorithm> getUsedCertificatesDigestAlgorithms()
boolean isDataForSignatureLevelPresent(SignatureLevel signatureLevel)
signatureLevel - SignatureLevel to be checkedSignatureLevel. Doesn't mean any validity
of the data found.SignatureLevel getDataFoundUpToLevel()
SignatureLevel[] getSignatureLevels()
void prepareTimestamps(ValidationContext validationContext)
void validateTimestamps()
void validateStructure()
String getStructureValidationResult()
void checkSignaturePolicy(SignaturePolicyProvider signaturePolicyDetector)
void findSignatureScope(SignatureScopeFinder signatureScopeFinder)
List<SignatureScope> getSignatureScopes()
Copyright © 2018. All rights reserved.