Fix fips mode detection in gcrypt backend.

gcry_fips_mode_active must not be called before
gcry_check_version. Let's initialize backend in
before fips mode detection if it needs to.
This commit is contained in:
Ondrej Kozina
2023-04-13 14:05:20 +02:00
committed by Milan Broz
parent a617c23ccc
commit b6eaa236bc

View File

@@ -565,6 +565,9 @@ bool crypt_fips_mode(void)
if (fips_checked)
return fips_mode;
if (crypt_backend_init(false /* ignored */))
return false;
fips_mode = gcry_fips_mode_active();
fips_checked = true;