Pkcs11ex.PDF (pkcs11ex v0.1.0)

Copy Markdown View Source

Convenience wrapper around SignCore.PDF pre-configured with the PKCS#11 signer.

Pkcs11ex.PDF.sign(pdf,
  signer: {:legal_proxy, :signing},
  alg: :PS256,
  x5c: leaf_der
)

is shorthand for

SignCore.PDF.sign(pdf,
  signer: %Pkcs11ex.Signer{slot_ref: :legal_proxy, key_ref: :signing},
  alg: :PS256,
  x5c: leaf_der
)

Verify is signer-independent — it just delegates to SignCore.PDF.verify/2.

Summary

Functions

PAdES B-B / B-T sign via the configured PKCS#11 slot.

Functions

sign(pdf_bytes, opts)

@spec sign(
  binary(),
  keyword()
) :: {:ok, binary()} | {:error, term()}

PAdES B-B / B-T sign via the configured PKCS#11 slot.

verify(pdf_bytes, opts \\ [])

@spec verify(
  binary(),
  keyword()
) :: {:ok, term()} | {:error, term()}

PAdES verify. Delegates to SignCore.PDF.verify/2.