Class JAdESLevelBaselineB

java.lang.Object
eu.europa.esig.dss.jades.signature.JAdESLevelBaselineB

public class JAdESLevelBaselineB extends Object
The class builds a JOSE header according to EN 119-182
  • Constructor Details

  • Method Details

    • getSignedProperties

      public Map<String,Object> 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

      protected void incorporateSigningCertificateSha256Thumbprint(CertificateToken signingCertificate)
      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

      protected void addHeader(String headerName, Object value)
      Adds a new header to the signedProperties map
      Parameters:
      headerName - String name of the header
      value - Object to add
    • getPayloadBytes

      public byte[] getPayloadBytes()
      Returns JWS payload for the given signature parameters
      Returns:
      payload byte array