summaryrefslogtreecommitdiff
path: root/cipher/pubkey-util.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2021-09-09 11:57:15 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2021-09-14 11:17:19 +0900
commitd04b1be9edacd7be6f03faba6f4d6c44c4247eb7 (patch)
tree2c2746ab349b283f0adbc05d2c3a7c48683c595d /cipher/pubkey-util.c
parent422031a5943f2e698036e3c0df5955c585f22c16 (diff)
downloadlibgcrypt-d04b1be9edacd7be6f03faba6f4d6c44c4247eb7.tar.gz
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 <gniibe@fsij.org>
Diffstat (limited to 'cipher/pubkey-util.c')
-rw-r--r--cipher/pubkey-util.c2
1 files changed, 2 insertions, 0 deletions
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;