Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/signatures/signers/p12.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ export class P12Signer implements Signer {
options: P12SignerOptions = {},
): Promise<P12Signer> {
try {
// Ensure our custom crypto engine is installed before any pkijs operations.
// pkijs's parseInternalValues() uses the engine internally to decrypt safe
// contents — if they use legacy algorithms (3DES, RC2), the default engine
// will fail with "Unknown contentEncryptionAlgorithm".
getCrypto();

// Ensure we have a proper ArrayBuffer (not SharedArrayBuffer)
const buffer = toArrayBuffer(p12Bytes);

Expand Down