Skip to content

Commit 310b3cd

Browse files
tniessennpaun
authored andcommitted
crypto: fix EVPKeyCtxPointer::publicCheck()
Commit 206ebeb44764d58c6a505657edab3a7a78a0b977 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/node#56812 PR-URL: nodejs/node#59471 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent e3d603c commit 310b3cd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/ncrypto.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3433,7 +3433,6 @@ EVPKeyPointer EVPKeyCtxPointer::paramgen() const {
34333433
bool EVPKeyCtxPointer::publicCheck() const {
34343434
if (!ctx_) return false;
34353435
#ifndef OPENSSL_IS_BORINGSSL
3436-
return EVP_PKEY_public_check(ctx_.get()) == 1;
34373436
#if OPENSSL_VERSION_MAJOR >= 3
34383437
return EVP_PKEY_public_check_quick(ctx_.get()) == 1;
34393438
#else

0 commit comments

Comments
 (0)