From f56590e161ca6d2eeda13339af6fc981fce0fd68 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 12 May 2025 14:11:50 +0200 Subject: [PATCH] crypto: handle missing OPENSSL_TLS_SECURITY_LEVEL PR-URL: https://github.com/nodejs/node/pull/58103 Reviewed-By: Michael Dawson Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Rafael Gonzaga --- deps/ncrypto/ncrypto.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc index 04881466c9f..7aa91497663 100644 --- a/deps/ncrypto/ncrypto.cc +++ b/deps/ncrypto/ncrypto.cc @@ -2744,8 +2744,9 @@ std::optional SSLPointer::getSecurityLevel() { return SSL_get_security_level(ssl); #else - // for BoringSSL assume the same as the default - return OPENSSL_TLS_SECURITY_LEVEL; + // OPENSSL_TLS_SECURITY_LEVEL is not defined in BoringSSL + // so assume it is the default OPENSSL_TLS_SECURITY_LEVEL value. + return 1; #endif // OPENSSL_IS_BORINGSSL }