Class CAdESSignature
java.lang.Object
eu.europa.esig.dss.validation.DefaultAdvancedSignature
eu.europa.esig.dss.cades.validation.CAdESSignature
- All Implemented Interfaces:
AdvancedSignature,Serializable
public class CAdESSignature extends DefaultAdvancedSignature
CAdES Signature class helper
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature
DefaultAdvancedSignature.RevocationDataForInclusion -
Field Summary
Fields inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature
candidatesForSigningCertificate, certPool, detachedContents, manifestFiles, offlineCertificateSource, providedSigningCertificateToken, referenceValidations, signatureCRLSource, signatureCryptographicVerification, signatureIdentifier, signatureOCSPSource, signaturePolicy, signatureTimestampSource, structureValidation -
Constructor Summary
Constructors Constructor Description CAdESSignature(byte[] data)CAdESSignature(byte[] data, eu.europa.esig.dss.spi.x509.CertificatePool certPool)CAdESSignature(org.bouncycastle.cms.CMSSignedData cms, eu.europa.esig.dss.spi.x509.CertificatePool certPool)The default constructor for CAdESSignature.CAdESSignature(org.bouncycastle.cms.CMSSignedData cms, eu.europa.esig.dss.spi.x509.CertificatePool certPool, List<eu.europa.esig.dss.model.DSSDocument> detachedContents)CAdESSignature(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation)CAdESSignature(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, eu.europa.esig.dss.spi.x509.CertificatePool certPool)The default constructor for CAdESSignature. -
Method Summary
Modifier and Type Method Description protected SignatureIdentifierbuildSignatureIdentifier()voidcheckSignatureIntegrity()voidcheckSignaturePolicy(SignaturePolicyProvider signaturePolicyProvider)voidcheckSigningCertificate()CandidatesForSigningCertificategetCandidatesForSigningCertificate()ETSI TS 101 733 V2.2.1 (2013-04) 5.6.3 Signature Verification Process ...the public key from the first certificate identified in the sequence of certificate identifiers from SigningCertificate shall be the key used to verify the digital signature.List<CertificateRef>getCertificateRefs()SignatureCertificateSourcegetCertificateSource()List<SignerRole>getCertifiedSignerRoles()List<SignerRole>getClaimedSignerRoles()org.bouncycastle.cms.CMSSignedDatagetCmsSignedData()CommitmentTypegetCommitmentTypeIndication()StringgetContentHints()StringgetContentIdentifier()StringgetContentType()List<AdvancedSignature>getCounterSignatures()SignatureCRLSourcegetCRLSource()StringgetDAIdentifier()eu.europa.esig.dss.enumerations.DigestAlgorithmgetDigestAlgorithm()eu.europa.esig.dss.enumerations.EncryptionAlgorithmgetEncryptionAlgorithm()eu.europa.esig.dss.enumerations.MaskGenerationFunctiongetMaskGenerationFunction()Set<eu.europa.esig.dss.enumerations.DigestAlgorithm>getMessageDigestAlgorithms()byte[]getMessageDigestValue()StringgetMimeType()SignatureOCSPSourcegetOCSPSource()eu.europa.esig.dss.model.DSSDocumentgetOriginalDocument()eu.europa.esig.dss.enumerations.DigestAlgorithmgetPSSHashAlgorithm()List<ReferenceValidation>getReferenceValidations()List<ReferenceValidation>getReferenceValidations(org.bouncycastle.cms.SignerInformation signerInformationToCheck)eu.europa.esig.dss.enumerations.SignatureAlgorithmgetSignatureAlgorithm()SignatureDigestReferencegetSignatureDigestReference(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch.eu.europa.esig.dss.enumerations.SignatureFormgetSignatureForm()eu.europa.esig.dss.enumerations.SignatureLevel[]getSignatureLevels()SignatureProductionPlacegetSignatureProductionPlace()byte[]getSignatureValue()org.bouncycastle.cms.SignerIdgetSignerId()ReturnsSignerIdof the related to the signaturesignerInformationorg.bouncycastle.cms.SignerInformationgetSignerInformation()DategetSigningTime()List<TimestampedReference>getTimestampReferencesForArchiveTimestamp(List<TimestampToken> timestampedTimestamps)CAdESTimestampSourcegetTimestampSource()booleanisDataForSignatureLevelPresent(eu.europa.esig.dss.enumerations.SignatureLevel signatureLevel)Methods inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature
addEncapsulatedCertificatesFromTimestamp, addExternalTimestamp, addReference, addReferences, addReferencesForCertificates, addReferencesForPreviousTimestamps, addReferencesFromRevocationData, equals, findRefsForRevocationIdentifier, findRefsForRevocationToken, findSignatureScope, getAllFoundRevocationIdentifiers, getAllFoundRevocationRefs, getAllRevocationTokens, getAllTimestamps, getArchiveTimestamps, getAttributeRevocationCRLReferences, getAttributeRevocationOCSPReferences, getAttributeRevocationTokens, getAttributeRevocationValuesTokens, getCertificateListWithinSignatureAndTimestamps, getCertificateMapWithinSignatureAndTimestamps, getCertificates, getCertificatesForInclusion, getCompleteCRLSource, getCompleteOCSPSource, getCompleteRevocationCRLReferences, getCompleteRevocationOCSPReferences, getCompleteRevocationTokens, getContactInfo, getContainerContents, getContentTimestampReferences, getContentTimestamps, getDataFoundUpToLevel, getDetachedContents, getDocumentTimestamps, getDSSDictionaryRevocationTokens, getDSSId, getFilter, getId, getManifestedDocuments, getMasterSignature, getOrphanCertificateRefs, getOrphanRevocationRefs, getPolicyId, getProvidedSigningCertificateToken, getReason, getRevocationDataForInclusion, getRevocationValuesTokens, getSignatureByteRange, getSignatureCryptographicVerification, getSignatureFieldName, getSignatureFilename, getSignatureScopes, getSignatureTimestampReferences, getSignatureTimestamps, getSignatureValidationContext, getSignerName, getSignerRoles, getSigningCertificateTimestampReferences, getSigningCertificateToken, getStructureValidationResult, getSubFilter, getTimestampedReferencesFromCertificates, getTimestampRevocationCRLReferences, getTimestampRevocationOCSPReferences, getTimestampSourceCertificates, getTimestampsX1, getTimestampsX2, getTimestampValidationDataTokens, getVRIDictionaryRevocationTokens, hashCode, hasLTAProfile, hasLTProfile, hasTProfile, isDocHashOnlyValidation, isHashOnlyValidation, populateCRLTokenLists, populateOCSPTokenLists, prepareTimestamps, setContainerContents, setDetachedContents, setManifestFiles, setMasterSignature, setProvidedSigningCertificateToken, setSignatureFilename, validateStructure
-
Constructor Details
-
CAdESSignature
public CAdESSignature(byte[] data) throws org.bouncycastle.cms.CMSException- Parameters:
data- byte array representing CMSSignedData- Throws:
org.bouncycastle.cms.CMSException
-
CAdESSignature
public CAdESSignature(byte[] data, eu.europa.esig.dss.spi.x509.CertificatePool certPool) throws org.bouncycastle.cms.CMSException- Parameters:
data- byte array representing CMSSignedDatacertPool- can be null- Throws:
org.bouncycastle.cms.CMSException
-
CAdESSignature
public CAdESSignature(org.bouncycastle.cms.CMSSignedData cms, eu.europa.esig.dss.spi.x509.CertificatePool certPool)The default constructor for CAdESSignature.- Parameters:
cms- CMSSignedDatacertPool- can be null
-
CAdESSignature
public CAdESSignature(org.bouncycastle.cms.CMSSignedData cms, eu.europa.esig.dss.spi.x509.CertificatePool certPool, List<eu.europa.esig.dss.model.DSSDocument> detachedContents) -
CAdESSignature
public CAdESSignature(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation)- Parameters:
cmsSignedData- CMSSignedDatasignerInformation- an expanded SignerInfo block from a CMS Signed message
-
CAdESSignature
public CAdESSignature(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, eu.europa.esig.dss.spi.x509.CertificatePool certPool)The default constructor for CAdESSignature.- Parameters:
cmsSignedData- CMSSignedDatasignerInformation- an expanded SignerInfo block from a CMS Signed messagecertPool- can be null
-
-
Method Details
-
getSignatureForm
public eu.europa.esig.dss.enumerations.SignatureForm getSignatureForm() -
getCertificateSource
-
getCRLSource
-
getOCSPSource
-
getTimestampSource
-
getSignerId
public org.bouncycastle.cms.SignerId getSignerId()ReturnsSignerIdof the related to the signaturesignerInformation- Returns:
SignerId
-
getCandidatesForSigningCertificate
ETSI TS 101 733 V2.2.1 (2013-04) 5.6.3 Signature Verification Process ...the public key from the first certificate identified in the sequence of certificate identifiers from SigningCertificate shall be the key used to verify the digital signature.- Returns:
-
checkSignaturePolicy
-
getSigningTime
-
getCmsSignedData
public org.bouncycastle.cms.CMSSignedData getCmsSignedData()- Returns:
- the cmsSignedData
-
getSignatureProductionPlace
-
getCommitmentTypeIndication
-
getClaimedSignerRoles
-
getCertifiedSignerRoles
-
getTimestampReferencesForArchiveTimestamp
public List<TimestampedReference> getTimestampReferencesForArchiveTimestamp(List<TimestampToken> timestampedTimestamps) -
getEncryptionAlgorithm
public eu.europa.esig.dss.enumerations.EncryptionAlgorithm getEncryptionAlgorithm() -
getDigestAlgorithm
public eu.europa.esig.dss.enumerations.DigestAlgorithm getDigestAlgorithm() -
getPSSHashAlgorithm
public eu.europa.esig.dss.enumerations.DigestAlgorithm getPSSHashAlgorithm() -
getMaskGenerationFunction
public eu.europa.esig.dss.enumerations.MaskGenerationFunction getMaskGenerationFunction() -
getSignatureAlgorithm
public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm() -
checkSignatureIntegrity
public void checkSignatureIntegrity() -
getReferenceValidations
public List<ReferenceValidation> getReferenceValidations(org.bouncycastle.cms.SignerInformation signerInformationToCheck) -
getReferenceValidations
-
getSignatureDigestReference
public SignatureDigestReference getSignatureDigestReference(eu.europa.esig.dss.enumerations.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 CAdES signatures, the input to the digest value computation shall be one of the DER-encoded instances of SignedInfo type present within the CMS structure. -
checkSigningCertificate
public void checkSigningCertificate() -
getMessageDigestAlgorithms
-
getMessageDigestValue
public byte[] getMessageDigestValue()- Specified by:
getMessageDigestValuein interfaceAdvancedSignature- Overrides:
getMessageDigestValuein classDefaultAdvancedSignature
-
getContentType
-
getMimeType
-
getContentIdentifier
-
getContentHints
-
getSignerInformation
public org.bouncycastle.cms.SignerInformation getSignerInformation()- Returns:
- the signerInformation
-
getSignatureValue
public byte[] getSignatureValue() -
getCounterSignatures
-
getCertificateRefs
-
getOriginalDocument
public eu.europa.esig.dss.model.DSSDocument getOriginalDocument() throws eu.europa.esig.dss.model.DSSException- Throws:
eu.europa.esig.dss.model.DSSException
-
buildSignatureIdentifier
- Specified by:
buildSignatureIdentifierin classDefaultAdvancedSignature
-
getDAIdentifier
-
isDataForSignatureLevelPresent
public boolean isDataForSignatureLevelPresent(eu.europa.esig.dss.enumerations.SignatureLevel signatureLevel) -
getSignatureLevels
public eu.europa.esig.dss.enumerations.SignatureLevel[] getSignatureLevels()
-