summaryrefslogtreecommitdiff
path: root/cipher/md5.c
diff options
context:
space:
mode:
authorVitezslav Cizek <vcizek@suse.com>2015-10-29 17:13:16 +0100
committerWerner Koch <wk@gnupg.org>2016-03-18 15:48:15 +0100
commitce1cbe16992a7340edcf8e6576973e3508267640 (patch)
treeab4d7c4b3429f83878803f1db98df8830a856dc9 /cipher/md5.c
parentc478cf175887c84dc071c4f73a7667603b354789 (diff)
downloadlibgcrypt-ce1cbe16992a7340edcf8e6576973e3508267640.tar.gz
Disable non-allowed algorithms in FIPS mode
* cipher/cipher.c (_gcry_cipher_init), * cipher/mac.c (_gcry_mac_init), * cipher/md.c (_gcry_md_init), * cipher/pubkey.c (_gcry_pk_init): In the FIPS mode, disable all the non-allowed ciphers. * cipher/md5.c: Mark MD5 as not allowed in FIPS. * src/g10lib.h (_gcry_mac_init): New. * src/global.c (global_init): Call the new _gcry_mac_init. * tests/basic.c (check_ciphers): Fix a typo. -- When running in the FIPS mode, disable all the ciphers that don't have the fips flag set. Skip the non-allowed algos during testing in the FIPS mode. Thanks to Ludwig Nussel. Signed-off-by: Vitezslav Cizek <vcizek@suse.com> Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
Diffstat (limited to 'cipher/md5.c')
-rw-r--r--cipher/md5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/md5.c b/cipher/md5.c
index 66cc5f62..ed942cf4 100644
--- a/cipher/md5.c
+++ b/cipher/md5.c
@@ -310,7 +310,7 @@ static gcry_md_oid_spec_t oid_spec_md5[] =
gcry_md_spec_t _gcry_digest_spec_md5 =
{
- GCRY_MD_MD5, {0, 1},
+ GCRY_MD_MD5, {0, 0},
"MD5", asn, DIM (asn), oid_spec_md5, 16,
md5_init, _gcry_md_block_write, md5_final, md5_read, NULL,
sizeof (MD5_CONTEXT)