[PATCH 3/3] visibility: add missing fips_is_operational check for gcry_md_extract
Jussi Kivilinna
jussi.kivilinna at iki.fi
Sat Jul 16 18:00:05 CEST 2022
* src/visibility.c (gcry_md_extract): Add 'fips_is_operational' check.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
src/visibility.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/visibility.c b/src/visibility.c
index aee5bffb..daaf4033 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1244,7 +1244,9 @@ gcry_md_read (gcry_md_hd_t hd, int algo)
gcry_error_t
gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length)
{
- return gpg_error (_gcry_md_extract(hd, algo, buffer, length));
+ if (!fips_is_operational ())
+ return gpg_error (fips_not_operational ());
+ return gpg_error (_gcry_md_extract (hd, algo, buffer, length));
}
void
--
2.34.1
More information about the Gcrypt-devel
mailing list