Skip to content

Commit 621d187

Browse files
codebytereanonrig
authored andcommitted
crypto: handle missing OPENSSL_TLS_SECURITY_LEVEL
PR-URL: nodejs/node#58103 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 601f15b commit 621d187

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

include/ncrypto.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ using OPENSSL_SIZE_T = int;
5252
#ifdef NCRYPTO_BSSL_NEEDS_DH_PRIMES
5353
#include "dh-primes.h"
5454
#endif // NCRYPTO_BSSL_NEEDS_DH_PRIMES
55-
// FIXME: This should be removed when patch 0037 is applied
56-
#define OPENSSL_TLS_SECURITY_LEVEL 1
5755
#endif // OPENSSL_IS_BORINGSSL
5856

5957
namespace ncrypto {

src/ncrypto.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,8 +2898,9 @@ std::optional<int> SSLPointer::getSecurityLevel() {
28982898

28992899
return SSL_get_security_level(ssl);
29002900
#else
2901-
// for BoringSSL assume the same as the default
2902-
return OPENSSL_TLS_SECURITY_LEVEL;
2901+
// OPENSSL_TLS_SECURITY_LEVEL is not defined in BoringSSL
2902+
// so assume it is the default OPENSSL_TLS_SECURITY_LEVEL value.
2903+
return 1;
29032904
#endif // OPENSSL_IS_BORINGSSL
29042905
}
29052906

0 commit comments

Comments
 (0)