Closed
Description
Version
current
Platform
all
Subsystem
crypto
What steps will reproduce the bug?
crypto.sign('sha512', '', crypto.generateKeyPairSync('rsa', { modulusLength: 512 }).privateKey)
How often does it reproduce? Is there a required condition?
One of the internal OpenSSL calls must fail, in this case, due to incompatible digest and modulus length.
What is the expected behavior?
A useful error message.
What do you see instead?
Uncaught Error: Deriving bits failed
at Object.signOneShot [as sign] (node:internal/crypto/sig:181:42)
Additional information
No response