-
Notifications
You must be signed in to change notification settings - Fork 209
Open
Description
While developing for nodejs, I got an:
Error: Please call 'setEngine' before call to 'getEngine'
I didn’t call setEngine()
because I pass the crypto engine to each function myself. I instantiated the engine like this:
import { webcrypto } from 'crypto';
const crypto = new CryptoEngine({ name: 'node-webcrypto', crypto: webcrypto as Crypto });
The stack trace told me the error originated in AuthenticatedSafe.makeInternalValues()
, so I looked there if maybe the crypto
param wasn’t passed down, and I think I found the culprit here:
PKI.js/src/AuthenticatedSafe.ts
Line 304 in 469c403
await cmsEncrypted.encrypt(currentParameters); |
My node version: v18.14.2
Metadata
Metadata
Assignees
Labels
No labels