Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto parameter is not passed on in AuthenticatedSafe #379

Open
zner0L opened this issue May 30, 2023 · 0 comments
Open

crypto parameter is not passed on in AuthenticatedSafe #379

zner0L opened this issue May 30, 2023 · 0 comments

Comments

@zner0L
Copy link

zner0L commented May 30, 2023

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:

await cmsEncrypted.encrypt(currentParameters);

My node version: v18.14.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant