mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
crypto: fix builds with older OpenSSL 3.0
Ubuntu 22.04's default libssl-dev still lacks EVP_PKEY_PRIVATE_KEY even when fully updated. Provide the OpenSSL 3.0.12 definition when the headers do not define it so --shared-openssl builds work. Fixes: https://github.com/nodejs/node/issues/66926 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/66931 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com>
This commit is contained in:
1 parent
763524d434
commit
91c4436158
1 file changed
+7
Vendored
+7
@@ -43,6 +43,13 @@
|
||||
nullptr)
|
||||
#endif
|
||||
|
||||
// Ubuntu 22.04's default libssl-dev still lacks EVP_PKEY_PRIVATE_KEY when
|
||||
// fully updated. The macro was added upstream in OpenSSL 3.0.12.
|
||||
#if NCRYPTO_USE_OPENSSL3_PROVIDER && !defined(EVP_PKEY_PRIVATE_KEY)
|
||||
#define EVP_PKEY_PRIVATE_KEY \
|
||||
(EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PRIVATE_KEY)
|
||||
#endif
|
||||
|
||||
namespace ncrypto {
|
||||
namespace {
|
||||
using BignumCtxPointer = DeleteFnPtr<BN_CTX, BN_CTX_free>;
|
||||
|
||||
Reference in new issue
Block a user