crypto: handle missing OPENSSL_TLS_SECURITY_LEVEL

PR-URL: https://github.com/nodejs/node/pull/58103
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Shelley Vohr 2025-05-12 14:11:50 +02:00 committed by GitHub
parent 91d2400c74
commit f56590e161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2744,8 +2744,9 @@ std::optional<int> 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
}