The libgcrypt in Fedora's mingw-libgcrypt package is patched to always
run self-tests, even if FIPS mode isn't on.
Ensure self-tests run before we turn on voluble debugging, to avoid even
more log spam.
If we're going to run the self-test, we should report if it fails :)
{
#if CRYPTODEBUGGING
gcry_set_log_handler (gcrypt_log_adaptor, NULL);
- gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1);
#endif
gcry_check_version (NULL);
+
+ if ((rv = gcry_control (GCRYCTL_SELFTEST)) != GPG_ERR_NO_ERROR)
+ ERRKIND (owner, IDS_CRYPTO_ERROR, rv, "libgcrypt selftest failed");
+
+#if CRYPTODEBUGGING
+ gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1);
+#endif
gcrypt_init = true;
}