Skip to content

crypto parameter is not passed on in AuthenticatedSafe #379

@zner0L

Description

@zner0L

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions