Skip to content

Pkcs7Signer

A single signer for createPkcs7SignedData.

ts
interface Pkcs7Signer {
	readonly certificate: Pkcs7CertificateSource;
	readonly privateKey: CryptoKey;
	readonly signature?: SignatureProfileInput;
}

Properties

  • readonly certificate: Pkcs7CertificateSource — Signer certificate (PEM text with one CERTIFICATE block, or raw DER). Embedded in the SignedData certificate set and referenced by the SignerInfo via issuerAndSerialNumber.
  • readonly privateKey: CryptoKey — Private key matching the certificate's public key, used to sign.
  • readonly signature?: SignatureProfileInput — Signature profile. Defaults to inferring the algorithm from the key (e.g. ECDSA→ecdsa-with-SHA*, RSA→sha*WithRSAEncryption, Ed25519). Pass { kind: 'rsa-pss' } to force RSA-PSS padding for an RSA-PSS key.

Released under the MIT License.