Class CAdESSignaturePolicyStoreBuilder
java.lang.Object
eu.europa.esig.dss.cades.signature.CAdESSignaturePolicyStoreBuilder
Builds a SignaturePolicyStore for a CAdES signature
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddSignaturePolicyStore
(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore) Extends all signatures within the given document, matching the provided policy inSignaturePolicyStore
addSignaturePolicyStore
(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore, String signatureId) Adds a signaturePolicyStore to a signature with the givensignatureId
, if the signature policy identifier matches the policy provided withinSignaturePolicyStore
protected org.bouncycastle.cms.SignerInformation
addSignaturePolicyStoreIfDigestMatch
(CAdESSignature cadesSignature, SignaturePolicyStore signaturePolicyStore) This method addsSignaturePolicyStore
to acadesSignature
if requiredprotected boolean
checkDigest
(CAdESSignature cadesSignature, SignaturePolicyStore signaturePolicyStore) This method verifies if the digests computed in the providedSignaturePolicyStore
match the digest defined in the incorporated signature policy identifierorg.bouncycastle.cms.CMSSignedData
extendCMSSignedData
(org.bouncycastle.cms.CMSSignedData cmsSignedData, SignaturePolicyStore signaturePolicyStore) Creates a new CMSSignedData with a SignaturePolicyStore for matching signaturesorg.bouncycastle.cms.CMSSignedData
extendCMSSignedData
(org.bouncycastle.cms.CMSSignedData cmsSignedData, SignaturePolicyStore signaturePolicyStore, String signatureId) Creates a new CMSSignedData with a SignaturePolicyStore for a signature withsignatureId
-
Constructor Details
-
CAdESSignaturePolicyStoreBuilder
public CAdESSignaturePolicyStoreBuilder()Default constructor
-
-
Method Details
-
addSignaturePolicyStore
public DSSDocument addSignaturePolicyStore(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore) Extends all signatures within the given document, matching the provided policy inSignaturePolicyStore
- Parameters:
signatureDocument
-DSSDocument
to extendsignaturePolicyStore
-SignaturePolicyStore
to add- Returns:
CMSSignedData
with a SignaturePolicyStore
-
extendCMSSignedData
public org.bouncycastle.cms.CMSSignedData extendCMSSignedData(org.bouncycastle.cms.CMSSignedData cmsSignedData, SignaturePolicyStore signaturePolicyStore) Creates a new CMSSignedData with a SignaturePolicyStore for matching signatures- Parameters:
cmsSignedData
-CMSSignedData
to extendsignaturePolicyStore
-SignaturePolicyStore
to add- Returns:
CMSSignedData
with a SignaturePolicyStore
-
addSignaturePolicyStore
public DSSDocument addSignaturePolicyStore(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore, String signatureId) Adds a signaturePolicyStore to a signature with the givensignatureId
, if the signature policy identifier matches the policy provided withinSignaturePolicyStore
- Parameters:
signatureDocument
-DSSDocument
containing signatures to add signature policy store intosignaturePolicyStore
-SignaturePolicyStore
to addsignatureId
-String
Id of a signature to add SignaturePolicyStore for- Returns:
DSSDocument
with signaturePolicyStore
-
extendCMSSignedData
public org.bouncycastle.cms.CMSSignedData extendCMSSignedData(org.bouncycastle.cms.CMSSignedData cmsSignedData, SignaturePolicyStore signaturePolicyStore, String signatureId) Creates a new CMSSignedData with a SignaturePolicyStore for a signature withsignatureId
- Parameters:
cmsSignedData
-CMSSignedData
to extendsignaturePolicyStore
-SignaturePolicyStore
to addsignatureId
-String
id of a signature to add signature policy store to- Returns:
CMSSignedData
with a SignaturePolicyStore
-
addSignaturePolicyStoreIfDigestMatch
protected org.bouncycastle.cms.SignerInformation addSignaturePolicyStoreIfDigestMatch(CAdESSignature cadesSignature, SignaturePolicyStore signaturePolicyStore) This method addsSignaturePolicyStore
to acadesSignature
if required- Parameters:
cadesSignature
-CAdESSignature
signature to addSignaturePolicyStore
signaturePolicyStore
-SignaturePolicyStore
to be added- Returns:
SignerInformation
containingSignaturePolicyStore
if it has been added, originalSignerInformation
otherwise
-
checkDigest
protected boolean checkDigest(CAdESSignature cadesSignature, SignaturePolicyStore signaturePolicyStore) This method verifies if the digests computed in the providedSignaturePolicyStore
match the digest defined in the incorporated signature policy identifier- Parameters:
cadesSignature
-CAdESSignature
to check signature policy identifiersignaturePolicyStore
-SignaturePolicyStore
to be incorporated- Returns:
- TRUE if the digest match and
SignaturePolicyStore
can be embedded, FALSE otherwise
-