Unverified Commit 69bcca12 authored by Tobias Nießen's avatar Tobias Nießen Committed by Beth Griggs
Browse files

crypto: avoid unitializing ECDH objects on error

The previous code changed the private key of the ECDH object, but
removed the public key if deriving it from the private key failed.
Instead, if deriving the public key fails, neither the private nor
the public key stored in the ECDH object should be updated.

PR-URL: https://github.com/nodejs/node/pull/34302


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent a78c638f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment