Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2bc839

Browse filesBrowse files
richardlauruyadorno
authored andcommitted
crypto: remove OPENSSL_FIPS guard for OpenSSL 3
The OPENSSL_FIPS guard is only needed for versions of OpenSSL earlier than 3.0. Removing the guard for OpenSSL 3 fixes `parallel/test-crypto-fips` when run with a FIPS enabled OpenSSL 3 configuration. PR-URL: #48392 Refs: #48379 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 9cf8fe6 commit b2bc839
Copy full SHA for b2bc839

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎src/crypto/crypto_util.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_util.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ void TestFipsCrypto(const v8::FunctionCallbackInfo<v8::Value>& args) {
254254
Mutex::ScopedLock lock(per_process::cli_options_mutex);
255255
Mutex::ScopedLock fips_lock(fips_mutex);
256256

257-
#ifdef OPENSSL_FIPS
258257
#if OPENSSL_VERSION_MAJOR >= 3
259258
OSSL_PROVIDER* fips_provider = nullptr;
260259
if (OSSL_PROVIDER_available(nullptr, "fips")) {
@@ -263,11 +262,12 @@ void TestFipsCrypto(const v8::FunctionCallbackInfo<v8::Value>& args) {
263262
const auto enabled = fips_provider == nullptr ? 0 :
264263
OSSL_PROVIDER_self_test(fips_provider) ? 1 : 0;
265264
#else
265+
#ifdef OPENSSL_FIPS
266266
const auto enabled = FIPS_selftest() ? 1 : 0;
267-
#endif
268267
#else // OPENSSL_FIPS
269268
const auto enabled = 0;
270269
#endif // OPENSSL_FIPS
270+
#endif
271271

272272
args.GetReturnValue().Set(enabled);
273273
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.