From d04b1be9edacd7be6f03faba6f4d6c44c4247eb7 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 9 Sep 2021 11:57:15 +0900 Subject: cipher: Fix support of sha512-224 and sha512-256. * cipher/pubkey-util.c (get_hash_algo): Add. * cipher/sha512.c (sha512_256_asn, sha512_224_asn): Fill correct values. Signed-off-by: NIIBE Yutaka --- cipher/pubkey-util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cipher/pubkey-util.c') diff --git a/cipher/pubkey-util.c b/cipher/pubkey-util.c index 17816ef9..e3daf53b 100644 --- a/cipher/pubkey-util.c +++ b/cipher/pubkey-util.c @@ -232,6 +232,8 @@ get_hash_algo (const char *s, size_t n) { "sm3", GCRY_MD_SM3 }, { "shake128", GCRY_MD_SHAKE128 }, { "shake256", GCRY_MD_SHAKE256 }, + { "sha512-224", GCRY_MD_SHA512_224 }, + { "sha512-256", GCRY_MD_SHA512_256 }, { NULL, 0 } }; int algo; -- cgit v1.2.1