summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-08-10 10:01:03 +0200
committerWerner Koch <wk@gnupg.org>2020-08-10 10:22:42 +0200
commitbb096905b9ee1f5175efee1ab6c98045a26a2678 (patch)
treef7d44f717d0cb5657b92a92ce517ab583ddd5895 /scd
parentgpg: Fix trustdb for v5key. (diff)
downloadgnupg2-bb096905b9ee1f5175efee1ab6c98045a26a2678.tar.xz
gnupg2-bb096905b9ee1f5175efee1ab6c98045a26a2678.zip
agent: Add option --pss to pksign to be used by smartcards.
* agent/command.c (cmd_sethash): Add option --pss and allow for --hash=null. * agent/agent.h (struct server_control_s): Add digest.is_pss and zero where needed. * agent/pksign.c (agent_pksign_do): Allow for PSS with cards. * scd/command.c (cmd_pksign): Add for --hash=none. -- This is not a full implementaion of PSS but allows scdaemon card drivers to detect already PSS formatted data. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd')
-rw-r--r--scd/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 800156ca5..02cf8907f 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -891,7 +891,7 @@ pin_cb (void *opaque, const char *info, char **retstr)
static const char hlp_pksign[] =
- "PKSIGN [--hash=[rmd160|sha{1,224,256,384,512}|md5]] <hexified_id>\n"
+ "PKSIGN [--hash=[rmd160|sha{1,224,256,384,512}|md5|none]] <hexified_id>\n"
"\n"
"The --hash option is optional; the default is SHA1.";
static gpg_error_t
@@ -920,6 +920,8 @@ cmd_pksign (assuan_context_t ctx, char *line)
hash_algo = GCRY_MD_SHA512;
else if (has_option (line, "--hash=md5"))
hash_algo = GCRY_MD_MD5;
+ else if (has_option (line, "--hash=none")) /* For raw RSA. */
+ hash_algo = 0;
else if (!strstr (line, "--"))
hash_algo = GCRY_MD_SHA1;
else