Skip to content

Commit 5ca7c87

Browse files
tniessenpanva
authored andcommitted
crypto: fix EVPKeyCtxPointer::publicCheck()
Commit 206ebeb added an additional call to EVP_PKEY_public_check and an unconditional return from publicCheck(). This prevents the control flow from reaching the original call to either EVP_PKEY_public_check or EVP_PKEY_public_check_quick. This change restores the previous behavior, which calls EVP_PKEY_public_check_quick instead, if possible. Refs: nodejs#56812 PR-URL: nodejs#59471 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent e71240e commit 5ca7c87

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

deps/ncrypto/ncrypto.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3744,7 +3744,6 @@ EVPKeyPointer EVPKeyCtxPointer::paramgen() const {
37443744
bool EVPKeyCtxPointer::publicCheck() const {
37453745
if (!ctx_) return false;
37463746
#ifndef OPENSSL_IS_BORINGSSL
3747-
return EVP_PKEY_public_check(ctx_.get()) == 1;
37483747
#if OPENSSL_VERSION_MAJOR >= 3
37493748
return EVP_PKEY_public_check_quick(ctx_.get()) == 1;
37503749
#else

0 commit comments

Comments
 (0)