withJadesProfile

fun IssuanceBuilder.withJadesProfile(profile: JadesProfile, signerCertificateChain: List<ByteArray>, tsaConfig: TsaConfig? = null, contentType: String? = null)

Configure the issuance to produce a JAdES B-B or B-T signature.

Parameters

profile

Target JAdES profile. JadesProfile.B_B omits the signature-time-stamp; JadesProfile.B_T requires tsaConfig.

signerCertificateChain

DER-encoded X.509 chain, signer first. Must be non-empty — at minimum the signer's own certificate.

tsaConfig

TSA configuration for the signature-time-stamp. Required iff profile is JadesProfile.B_T; ignored for JadesProfile.B_B.

contentType

Optional JOSE cty for the protected header (e.g. "application/json").

Throws

if signerCertificateChain is empty, or if profile is JadesProfile.B_T without a tsaConfig.