aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-03-26 19:27:04 +0000
committerWerner Koch <[email protected]>2009-03-26 19:27:04 +0000
commit990585ad7d887265cacc0cd75cda12b38f8d6ff8 (patch)
tree6644488ea6906b3ec2d85ada0b23bc688bd4cfe5 /agent/command.c
parentFixed a trustlist update problem. (diff)
downloadgnupg-990585ad7d887265cacc0cd75cda12b38f8d6ff8.tar.gz
gnupg-990585ad7d887265cacc0cd75cda12b38f8d6ff8.zip
Signing using Netkey 3 cards does now work.
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/agent/command.c b/agent/command.c
index b31e40553..56d390bd8 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -637,8 +637,14 @@ cmd_sethash (assuan_context_t ctx, char *line)
{
if (has_option (line, "--hash=sha1"))
algo = GCRY_MD_SHA1;
+ else if (has_option (line, "--hash=sha224"))
+ algo = GCRY_MD_SHA224;
else if (has_option (line, "--hash=sha256"))
algo = GCRY_MD_SHA256;
+ else if (has_option (line, "--hash=sha384"))
+ algo = GCRY_MD_SHA384;
+ else if (has_option (line, "--hash=sha512"))
+ algo = GCRY_MD_SHA512;
else if (has_option (line, "--hash=rmd160"))
algo = GCRY_MD_RMD160;
else if (has_option (line, "--hash=md5"))
@@ -671,7 +677,8 @@ cmd_sethash (assuan_context_t ctx, char *line)
n /= 2;
if (algo == MD_USER_TLS_MD5SHA1 && n == 36)
;
- else if (n != 16 && n != 20 && n != 24 && n != 32)
+ else if (n != 16 && n != 20 && n != 24
+ && n != 28 && n != 32 && n != 48 && n != 64)
return set_error (GPG_ERR_ASS_PARAMETER, "unsupported length of hash");
if (n > MAX_DIGEST_LEN)