Skip to content

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

Merged
nodejs-github-bot merged 6 commits intonodejs:mainfrom
JLHwung:fix-node-signfinal-evp-pkey-usage
Sep 6, 2024
Merged

crypto: reject dh,x25519,x448 in {Sign,Verify}Final#53774
nodejs-github-bot merged 6 commits intonodejs:mainfrom
JLHwung:fix-node-signfinal-evp-pkey-usage

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jul 9, 2024

Fixes: #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.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

6 participants