node icon indicating copy to clipboard operation
node copied to clipboard

crypto: reject dh,x25519,x448 in {Sign,Verify}Final

Open JLHwung opened this issue 7 months ago • 13 comments

Fixes: https://github.com/nodejs/node/issues/53742

In this PR we handle the return value of EVP_PKEY_{sign,verify}_init, when it returns -2, we throw the ERR_OSSL_EVP_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE error. This approach is future proof as we don't have to maintain a list of key types that can not be used with signing / verifying.

JLHwung avatar Jul 09 '24 02:07 JLHwung