Class JAdESLevelBaselineB
java.lang.Object
eu.europa.esig.dss.jades.signature.JAdESLevelBaselineB
The class builds a JOSE header according to EN 119-182
-
Constructor Summary
ConstructorDescriptionJAdESLevelBaselineB
(CertificateVerifier certificateVerifier, JAdESSignatureParameters parameters, List<DSSDocument> documentsToSign) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds a new header to thesignedProperties
mapbyte[]
Returns JWS payload for the given signature parametersReturns a map representing the signed header of a signatureprotected void
Incorporates RFC 7797 Unencoded Payload Optionprotected void
Incorporates 5.1.8 The x5c (X.509 Certificate Chain) header parameterprotected void
Incorporates 5.2.6 The adoTst (signed data time-stamp) header parameterprotected void
Incorporates 5.1.3 The cty (content type) header parameterprotected void
Incorporates 5.1.9 The crit (critical) header parameterprotected void
Incorporates 5.2.8 The sigD header parameterprotected void
Incorporates 5.1.4 The kid (key identifier) header parameterprotected void
Incorporates 5.1.2 The alg (X.509 URL) header parameterprotected void
Incorporates 5.2.7 The sigPId (signature policy identifier) header parameterprotected void
Incorporates 5.2.4 The sigPl (signature production place) header parameterprotected void
Incorporates 5.2.3 The srCms (signer commitments) header parameterprotected void
Incorporates 5.2.5 The srAts (signer attributes) header parameterprotected void
Incorporates 5.1.7 The x5t#S256 (X.509 Certificate SHA-256 Thumbprint) header parameter or 5.2.2 The x5t#o (X509 certificate digest) header parameterprotected void
incorporateSigningCertificateOtherDigestReference
(CertificateToken signingCertificate, DigestAlgorithm digestAlgorithm) Incorporates 5.2.2.2 The x5t#o (X509 certificate digest) header parameterprotected void
incorporateSigningCertificateSha256Thumbprint
(CertificateToken signingCertificate) Incorporates 5.1.7 The x5t#S256 (X.509 Certificate SHA-256 Thumbprint) header parameterprotected void
Incorporates 5.1.5 The x5u (X.509 URL) header parameterprotected void
Incorporates 5.2.1 The sigT (claimed signing time) header parameterprotected void
Incorporates RFC 7515 : 4.1.9.protected void
Incorporates 5.2.2.3 The sigX5ts (X509 certificates digests)
-
Constructor Details
-
JAdESLevelBaselineB
public JAdESLevelBaselineB(CertificateVerifier certificateVerifier, JAdESSignatureParameters parameters, List<DSSDocument> documentsToSign) The default constructor- Parameters:
certificateVerifier
-CertificateVerifier
parameters
-JAdESSignatureParameters
documentsToSign
- a list ofDSSDocument
s to sign
-
-
Method Details
-
getSignedProperties
Returns a map representing the signed header of a signature- Returns:
- a map representing the signed header
-
incorporateSignatureAlgorithm
protected void incorporateSignatureAlgorithm()Incorporates 5.1.2 The alg (X.509 URL) header parameter -
incorporateContentType
protected void incorporateContentType()Incorporates 5.1.3 The cty (content type) header parameter -
incorporateKeyIdentifier
protected void incorporateKeyIdentifier()Incorporates 5.1.4 The kid (key identifier) header parameter -
incorporateSigningCertificateUri
protected void incorporateSigningCertificateUri()Incorporates 5.1.5 The x5u (X.509 URL) header parameter -
incorporateSigningCertificate
protected void incorporateSigningCertificate()Incorporates 5.1.7 The x5t#S256 (X.509 Certificate SHA-256 Thumbprint) header parameter or 5.2.2 The x5t#o (X509 certificate digest) header parameter -
incorporateSigningCertificateSha256Thumbprint
Incorporates 5.1.7 The x5t#S256 (X.509 Certificate SHA-256 Thumbprint) header parameter- Parameters:
signingCertificate
-CertificateToken
-
incorporateCertificateChain
protected void incorporateCertificateChain()Incorporates 5.1.8 The x5c (X.509 Certificate Chain) header parameter -
incorporateCritical
protected void incorporateCritical()Incorporates 5.1.9 The crit (critical) header parameter -
incorporateType
protected void incorporateType()Incorporates RFC 7515 : 4.1.9. "typ" (Type) Header Parameter -
incorporateB64
protected void incorporateB64()Incorporates RFC 7797 Unencoded Payload Option -
incorporateSigningTime
protected void incorporateSigningTime()Incorporates 5.2.1 The sigT (claimed signing time) header parameter -
incorporateSigningCertificateOtherDigestReference
protected void incorporateSigningCertificateOtherDigestReference(CertificateToken signingCertificate, DigestAlgorithm digestAlgorithm) Incorporates 5.2.2.2 The x5t#o (X509 certificate digest) header parameter- Parameters:
signingCertificate
-CertificateToken
digestAlgorithm
-DigestAlgorithm
-
incorporateX509CertificateDigests
protected void incorporateX509CertificateDigests()Incorporates 5.2.2.3 The sigX5ts (X509 certificates digests) -
incorporateSignerCommitments
protected void incorporateSignerCommitments()Incorporates 5.2.3 The srCms (signer commitments) header parameter -
incorporateSignatureProductionPlace
protected void incorporateSignatureProductionPlace()Incorporates 5.2.4 The sigPl (signature production place) header parameter -
incorporateSignerRoles
protected void incorporateSignerRoles()Incorporates 5.2.5 The srAts (signer attributes) header parameter -
incorporateContentTimestamps
protected void incorporateContentTimestamps()Incorporates 5.2.6 The adoTst (signed data time-stamp) header parameter -
incorporateSignaturePolicy
protected void incorporateSignaturePolicy()Incorporates 5.2.7 The sigPId (signature policy identifier) header parameter -
incorporateDetachedContents
protected void incorporateDetachedContents()Incorporates 5.2.8 The sigD header parameter -
addHeader
Adds a new header to thesignedProperties
map -
getPayloadBytes
public byte[] getPayloadBytes()Returns JWS payload for the given signature parameters- Returns:
- payload byte array
-