Package org.digidoc4j.impl.asic
Class AsicSignatureBuilder
java.lang.Object
org.digidoc4j.SignatureBuilder
org.digidoc4j.impl.asic.AsicSignatureBuilder
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AsicESignatureBuilder
,AsicSSignatureBuilder
Signature builder for Asic container.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates data to be signed externally.openAdESSignature
(byte[] signatureDocument) Open signature from an existing signature document (XAdES, PAdES, CAdES etc.)Methods inherited from class org.digidoc4j.SignatureBuilder
aSignature, invokeSigning, removeCustomSignatureBuilders, setSignatureBuilderForContainerType, withCity, withCountry, withDataFileDigestAlgorithm, withEncryptionAlgorithm, withOwnSignaturePolicy, withPostalCode, withRoles, withSignatureDigestAlgorithm, withSignatureId, withSignatureProfile, withSignatureToken, withSigningCertificate, withStateOrProvince
-
Constructor Details
-
AsicSignatureBuilder
public AsicSignatureBuilder()
-
-
Method Details
-
buildDataToSign
public DataToSign buildDataToSign() throws SignerCertificateRequiredException, ContainerWithoutFilesExceptionDescription copied from class:SignatureBuilder
Creates data to be signed externally.If the signing process involves signing the container externally (e.g. signing in the Web by a browser plugin), then
DataToSign
provides necessary data for creating a signature externally.- Specified by:
buildDataToSign
in classSignatureBuilder
- Returns:
- data to be signed externally.
- Throws:
SignerCertificateRequiredException
- signer certificate must be provided usingSignatureBuilder.withSigningCertificate(X509Certificate)
ContainerWithoutFilesException
- container must have at least one data file to be signed. Signature cannot be given on an empty container.
-
openAdESSignature
Description copied from class:SignatureBuilder
Open signature from an existing signature document (XAdES, PAdES, CAdES etc.)The signature document must be complete, containing all the necessary data (e.g. Signer's certificate, OCSP responses, Timestamps, signature values etc). An example would be a signature document in XAdES format which is an XML document transformed into a byte array.
- Specified by:
openAdESSignature
in classSignatureBuilder
- Parameters:
signatureDocument
- complete signature document in bytes.- Returns:
- a signature object representing the signatureDocument.
-
getConfiguration
-