diff --git a/lib/random.c b/lib/random.c index 25c8a2c8..6a16a700 100644 --- a/lib/random.c +++ b/lib/random.c @@ -162,6 +162,9 @@ int crypt_random_init(struct crypt_device *ctx) if(random_fd == -1) goto fail; + if (crypt_fips_mode()) + log_verbose(ctx, _("Running in FIPS mode.\n")); + random_initialised = 1; return 0; fail: diff --git a/src/Makefile.am b/src/Makefile.am index ee0c814c..5ed987d9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,6 @@ AM_CPPFLAGS = -include config.h \ cryptsetup_SOURCES = \ $(top_builddir)/lib/utils_crypt.c \ $(top_builddir)/lib/utils_loop.c \ - $(top_builddir)/lib/utils_fips.c \ utils_tools.c \ utils_password.c \ cryptsetup.c \ diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 8fc4d6c1..78f7313f 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -1568,9 +1568,6 @@ int main(int argc, const char **argv) usage(popt_context, EXIT_FAILURE, poptStrerror(r), poptBadOption(popt_context, POPT_BADOPTION_NOALIAS)); - if (crypt_fips_mode()) - crypt_log(NULL, CRYPT_LOG_VERBOSE, _("Running in FIPS mode.\n")); - if (opt_version_mode) { log_std("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION); poptFreeContext(popt_context);