Commit b41fabb13ce for nodejs
commit b41fabb13ce949879d7c7d24182f74ac358a53e5
Author: Filip Skokan <panva.ip@gmail.com>
Date: Sun Oct 25 11:44:54 2026 +0100
build: respect OpenSSL's configured API level
Shared OpenSSL 3 builds configured with --api=1.1.1 reject
OPENSSL_API_COMPAT=30000. Cap the requested compatibility level at the
configured API level for both ncrypto targets, retaining the 3.0
deprecation checks where supported.
Fixes: https://github.com/nodejs/node/issues/66950
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66953
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
diff --git a/deps/ncrypto/ncrypto.gyp b/deps/ncrypto/ncrypto.gyp
index 804a664fa0a..9b3732d6f95 100644
--- a/deps/ncrypto/ncrypto.gyp
+++ b/deps/ncrypto/ncrypto.gyp
@@ -9,15 +9,19 @@
'engine.cc',
'ncrypto.h',
],
+ # OpenSSL may be configured with --api below 3.0. Keep 3.0 deprecation
+ # checks where supported without exceeding its configured API level.
+ 'ncrypto_openssl3_api_compat':
+ '(OPENSSL_CONFIGURED_API<30000?OPENSSL_CONFIGURED_API:30000)',
'ncrypto_strict_defines': [
- 'OPENSSL_API_COMPAT=30000',
+ 'OPENSSL_API_COMPAT=<(ncrypto_openssl3_api_compat)',
'OPENSSL_NO_DEPRECATED',
],
'ncrypto_legacy_openssl_defines': [
'OPENSSL_API_COMPAT=0x10100000L',
],
'ncrypto_engine_defines': [
- 'OPENSSL_API_COMPAT=30000',
+ 'OPENSSL_API_COMPAT=<(ncrypto_openssl3_api_compat)',
'OPENSSL_SUPPRESS_DEPRECATED',
'NCRYPTO_ENGINE_COMPAT=1',
],