Class SignaturePolicyStoreBuilder
java.lang.Object
eu.europa.esig.dss.xades.signature.XAdESBuilder
eu.europa.esig.dss.xades.signature.ExtensionBuilder
eu.europa.esig.dss.xades.signature.SignaturePolicyStoreBuilder
Builds a XAdES SignaturePolicyStore
-
Field Summary
Fields inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
currentSignatureDom, documentAnalyzer, qualifyingPropertiesDom, unsignedPropertiesDom, unsignedSignaturePropertiesDom, xadesSignature
Fields inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
certificateVerifier, documentDom, ENCAPSULATED_TIMESTAMP_PREFIX, ID_PREFIX, params, REFERENCED_DATA, TARGET, TIMESTAMP_PREFIX, URI, xadesPath
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddSignaturePolicyStore
(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore) Adds a signaturePolicyStore to all signatures inside the document, matching the incorporated signature policyaddSignaturePolicyStore
(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 boolean
addSignaturePolicyStoreIfDigestMatch
(XAdESSignature xadesSignature, Document documentDom, SignaturePolicyStore signaturePolicyStore) This method addsSignaturePolicyStore
to adocumentDom
if requiredprotected boolean
checkDigest
(XAdESSignature xadesSignature, SignaturePolicyStore signaturePolicyStore) This method verifies if the digests computed in the providedSignaturePolicyStore
match the digest defined in the incorporated signature policy identifierMethods inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
alignNodes, ensureSignedDataObjectProperties, ensureUnsignedProperties, ensureUnsignedSignatureProperties, getXadesNamespace, getXmldsigNamespace, indentIfPrettyPrint, initializeSignatureBuilder, removeNode, removeNodes
Methods inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
createXmlDocument, getCurrentXAdESElements, getCurrentXAdESPath, getXades141Namespace, incorporateCert, incorporateCertDigest, incorporateDigestMethod, incorporateDigestValue, incorporateDigestValue, incorporateIssuerV1, incorporateIssuerV2, incorporateSPDocSpecification, toXmlIdentifier
-
Constructor Details
-
SignaturePolicyStoreBuilder
public SignaturePolicyStoreBuilder()Default constructor
-
-
Method Details
-
addSignaturePolicyStore
public DSSDocument addSignaturePolicyStore(DSSDocument signatureDocument, SignaturePolicyStore signaturePolicyStore) Adds a signaturePolicyStore to all signatures inside the document, matching the incorporated signature policy- Parameters:
signatureDocument
-DSSDocument
containing signatures to add signature policy store intosignaturePolicyStore
-SignaturePolicyStore
to add- Returns:
DSSDocument
with 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
-
addSignaturePolicyStoreIfDigestMatch
protected boolean addSignaturePolicyStoreIfDigestMatch(XAdESSignature xadesSignature, Document documentDom, SignaturePolicyStore signaturePolicyStore) This method addsSignaturePolicyStore
to adocumentDom
if required- Parameters:
xadesSignature
-XAdESSignature
signature to addSignaturePolicyStore
documentDom
-Document
root DOM of the signature documentsignaturePolicyStore
-SignaturePolicyStore
to be added- Returns:
- TRUE if the signaturePolicyStore has been added for the particular signature, FALSE otherwise
-
checkDigest
protected boolean checkDigest(XAdESSignature xadesSignature, SignaturePolicyStore signaturePolicyStore) This method verifies if the digests computed in the providedSignaturePolicyStore
match the digest defined in the incorporated signature policy identifier- Parameters:
xadesSignature
-XAdESSignature
to check signature policy identifiersignaturePolicyStore
-SignaturePolicyStore
to be incorporated- Returns:
- TRUE if the digest match and
SignaturePolicyStore
can be embedded, FALSE otherwise
-