public abstract class DefaultAdvancedSignature extends Object implements AdvancedSignature
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAdvancedSignature.RevocationDataForInclusion |
| Modifier and Type | Field and Description |
|---|---|
protected List<TimestampToken> |
archiveTimestamps |
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<TimestampToken> |
contentTimestamps |
protected List<DSSDocument> |
detachedContents
In case of a detached signature this is the signed document.
|
protected OfflineCRLSource |
offlineCRLSource |
protected OfflineOCSPSource |
offlineOCSPSource |
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<TimestampToken> |
refsOnlyTimestamps |
protected List<TimestampToken> |
sigAndRefsTimestamps |
protected SignatureCryptographicVerification |
signatureCryptographicVerification
This variable contains the result of the signature mathematical validation.
|
protected SignaturePolicy |
signaturePolicy |
protected List<TimestampToken> |
signatureTimestamps |
protected String |
structureValidation |
protected Set<DigestAlgorithm> |
usedCertificatesDigestAlgorithms
This list represents all digest algorithms used to calculate the digest values of certificates.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultAdvancedSignature(CertificatePool certPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExternalTimestamp(TimestampToken timestamp)
This method allows to add an external timestamp.
|
protected void |
addReferencesFromOfflineCRLSource(List<TimestampReference> references)
This method adds references to retrieved CRL responses from LT level.
|
protected void |
addReferencesFromOfflineOCSPSource(List<TimestampReference> references)
This method adds references to retrieved OCSP responses from LT level.
|
void |
checkSignaturePolicy(SignaturePolicyProvider signaturePolicyDetector) |
void |
findSignatureScope(SignatureScopeFinder signatureScopeFinder) |
List<CertificateToken> |
getCertificates()
Returns an unmodifiable list of all certificate tokens encapsulated in the signature
|
Set<CertificateToken> |
getCertificatesForInclusion(ValidationContext validationContext)
This method returns all certificates used during the validation process.
|
List<CertificateToken> |
getCertificatesWithinSignatureAndTimestamps() |
Map<String,List<CertificateToken>> |
getCertificatesWithinSignatureAndTimestamps(boolean skipLastArchiveTimestamp) |
SignatureLevel |
getDataFoundUpToLevel() |
List<DSSDocument> |
getDetachedContents() |
AdvancedSignature |
getMasterSignature() |
SignaturePolicy |
getPolicyId()
Returns the Signature Policy OID from the signature.
|
CertificateToken |
getProvidedSigningCertificateToken() |
DefaultAdvancedSignature.RevocationDataForInclusion |
getRevocationDataForInclusion(ValidationContext validationContext)
This method returns revocation values (ocsp and crl) that will be included in the LT profile.
|
SignatureCryptographicVerification |
getSignatureCryptographicVerification() |
String |
getSignatureFilename()
This method returns the signature filename (useful for ASiC and multiple signature files)
|
List<SignatureScope> |
getSignatureScopes() |
ValidationContext |
getSignatureValidationContext(CertificateVerifier certificateVerifier)
This method validates the signing certificate and all timestamps.
|
CertificateToken |
getSigningCertificateToken()
This method returns the signing certificate token or null if there is no valid signing certificate.
|
String |
getStructureValidationResult() |
Set<DigestAlgorithm> |
getUsedCertificatesDigestAlgorithms()
Returns the set of digest algorithms used to build the certificate's digest.
|
boolean |
hasLTAProfile() |
boolean |
hasLTProfile() |
boolean |
hasTProfile() |
void |
prepareTimestamps(ValidationContext validationContext)
This method adds to the
ValidationContext all timestamps to be validated. |
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()
This method adds all timestamps to be validated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckSignatureIntegrity, checkSigningCertificate, getArchiveTimestampData, getArchiveTimestamps, getCandidatesForSigningCertificate, getCertificateRefs, getCertificateSource, getCertifiedSignerRoles, getClaimedSignerRoles, getCommitmentTypeIndication, getContentHints, getContentIdentifier, getContentTimestampData, getContentTimestamps, getContentType, getCounterSignatures, getCRLRefs, getCRLSource, getDigestAlgorithm, getEncryptionAlgorithm, getId, getMaskGenerationFunction, getOCSPRefs, getOCSPSource, getSignatureAlgorithm, getSignatureForm, getSignatureLevels, getSignatureProductionPlace, getSignatureTimestampData, getSignatureTimestamps, getSigningTime, getTimestampedReferences, getTimestampsX1, getTimestampsX2, getTimestampX1Data, getTimestampX2Data, isDataForSignatureLevelPresentprotected final CertificatePool certPool
CertificatePoolprotected CertificateToken providedSigningCertificateToken
protected List<DSSDocument> detachedContents
protected SignatureCryptographicVerification signatureCryptographicVerification
checkSignatureIntegrity is called.protected String structureValidation
protected CandidatesForSigningCertificate candidatesForSigningCertificate
protected List<TimestampToken> contentTimestamps
protected transient List<TimestampToken> signatureTimestamps
protected List<TimestampToken> sigAndRefsTimestamps
protected List<TimestampToken> refsOnlyTimestamps
protected List<TimestampToken> archiveTimestamps
protected OfflineCRLSource offlineCRLSource
protected OfflineOCSPSource offlineOCSPSource
protected SignaturePolicy signaturePolicy
protected Set<DigestAlgorithm> usedCertificatesDigestAlgorithms
protected DefaultAdvancedSignature(CertificatePool certPool)
certPool - can be nullpublic String getSignatureFilename()
AdvancedSignaturegetSignatureFilename in interface AdvancedSignaturepublic void setSignatureFilename(String signatureFilename)
AdvancedSignaturesetSignatureFilename in interface AdvancedSignaturepublic List<DSSDocument> getDetachedContents()
getDetachedContents in interface AdvancedSignatureList of signed contents.public void setDetachedContents(List<DSSDocument> detachedContents)
AdvancedSignaturesetDetachedContents in interface AdvancedSignaturedetachedContents - List of DSSDocument representing the signed detached contents.public SignatureLevel getDataFoundUpToLevel()
getDataFoundUpToLevel in interface AdvancedSignaturepublic ValidationContext getSignatureValidationContext(CertificateVerifier certificateVerifier)
public List<CertificateToken> getCertificates()
getCertificates in interface AdvancedSignatureAdvancedSignature.getCertificates()public Set<CertificateToken> getCertificatesForInclusion(ValidationContext validationContext)
validationContext - validation context containing all information about the validation process of the signing certificate
and time-stampspublic List<CertificateToken> getCertificatesWithinSignatureAndTimestamps()
public Map<String,List<CertificateToken>> getCertificatesWithinSignatureAndTimestamps(boolean skipLastArchiveTimestamp)
public DefaultAdvancedSignature.RevocationDataForInclusion getRevocationDataForInclusion(ValidationContext validationContext)
validationContext - ValidationContext contains all the revocation data retrieved during the validation process.RevocationDataForInclusionpublic void setMasterSignature(AdvancedSignature masterSignature)
AdvancedSignaturesetMasterSignature in interface AdvancedSignaturemasterSignature - AdvancedSignaturepublic AdvancedSignature getMasterSignature()
getMasterSignature in interface AdvancedSignatureAdvancedSignaturepublic SignatureCryptographicVerification getSignatureCryptographicVerification()
getSignatureCryptographicVerification in interface AdvancedSignaturepublic CertificateToken getProvidedSigningCertificateToken()
getProvidedSigningCertificateToken in interface AdvancedSignaturenullpublic void setProvidedSigningCertificateToken(CertificateToken certificateToken)
AdvancedSignaturesetProvidedSigningCertificateToken in interface AdvancedSignaturecertificateToken - CertificateToken representing the signing certificate token.public CertificateToken getSigningCertificateToken()
AdvancedSignaturecheckSignatureIntegrity must be called.getSigningCertificateToken in interface AdvancedSignaturepublic void prepareTimestamps(ValidationContext validationContext)
ValidationContext all timestamps to be validated.prepareTimestamps in interface AdvancedSignaturevalidationContext - ValidationContext to which the timestamps must be addedpublic void validateTimestamps()
validateTimestamps in interface AdvancedSignaturepublic void validateStructure()
AdvancedSignaturevalidateStructure in interface AdvancedSignaturepublic String getStructureValidationResult()
getStructureValidationResult in interface AdvancedSignatureprotected void addReferencesFromOfflineOCSPSource(List<TimestampReference> references)
references - protected void addReferencesFromOfflineCRLSource(List<TimestampReference> references)
references - public Set<DigestAlgorithm> getUsedCertificatesDigestAlgorithms()
AdvancedSignaturegetUsedCertificatesDigestAlgorithms in interface AdvancedSignaturepublic SignaturePolicy getPolicyId()
AdvancedSignaturegetPolicyId in interface AdvancedSignatureSignaturePolicypublic void checkSignaturePolicy(SignaturePolicyProvider signaturePolicyDetector)
checkSignaturePolicy in interface AdvancedSignaturepublic void findSignatureScope(SignatureScopeFinder signatureScopeFinder)
findSignatureScope in interface AdvancedSignaturepublic List<SignatureScope> getSignatureScopes()
getSignatureScopes in interface AdvancedSignaturepublic void addExternalTimestamp(TimestampToken timestamp)
AdvancedSignatureaddExternalTimestamp in interface AdvancedSignaturetimestamp - the timestamp tokenpublic boolean hasTProfile()
public boolean hasLTProfile()
public boolean hasLTAProfile()
Copyright © 2018. All rights reserved.