Skip to content

Commit c94d2ac

Browse files
committed
squash! src: raise error for --enable-fips when no FIPS
Apply review feedback suggestions.
1 parent 47f5d9d commit c94d2ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crypto/crypto_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int NoPasswordCallback(char* buf, int size, int rwflag, void* u) {
104104
}
105105

106106
bool ProcessFipsOptions() {
107-
/* Override FIPS settings in cnf file, if needed. */
107+
/* Override FIPS settings in configuration file, if needed. */
108108
if (per_process::cli_options->enable_fips_crypto ||
109109
per_process::cli_options->force_fips_crypto) {
110110
#if OPENSSL_VERSION_MAJOR >= 3
@@ -116,7 +116,7 @@ bool ProcessFipsOptions() {
116116
return EVP_default_properties_enable_fips(nullptr, 1) &&
117117
EVP_default_properties_is_fips_enabled(nullptr);
118118
#else
119-
return 0 == FIPS_mode() && FIPS_mode_set(1);
119+
return FIPS_mode() == 0 && FIPS_mode_set(1);
120120
#endif
121121
}
122122
return true;

0 commit comments

Comments
 (0)