Skip to content

Commit

Permalink
squash! src: raise error for --enable-fips when no FIPS
Browse files Browse the repository at this point in the history
Apply review feedback suggestions.
  • Loading branch information
danbev committed May 31, 2021
1 parent d8d4642 commit bcfa6df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/crypto_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int NoPasswordCallback(char* buf, int size, int rwflag, void* u) {
}

bool ProcessFipsOptions() {
/* Override FIPS settings in cnf file, if needed. */
/* Override FIPS settings in configuration file, if needed. */
if (per_process::cli_options->enable_fips_crypto ||
per_process::cli_options->force_fips_crypto) {
#if OPENSSL_VERSION_MAJOR >= 3
Expand All @@ -116,7 +116,7 @@ bool ProcessFipsOptions() {
return EVP_default_properties_enable_fips(nullptr, 1) &&
EVP_default_properties_is_fips_enabled(nullptr);
#else
return 0 == FIPS_mode() && FIPS_mode_set(1);
return FIPS_mode() == 0 && FIPS_mode_set(1);
#endif
}
return true;
Expand Down

0 comments on commit bcfa6df

Please sign in to comment.