summaryrefslogtreecommitdiffstats
path: root/agent/pksign.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-05-18 19:24:41 +0200
committerWerner Koch <wk@gnupg.org>2020-05-18 19:24:41 +0200
commitb18fb0264abdb6cb0a99ba0ba941dc9a6e35f74a (patch)
tree28758d568244d5c5dd0c0adabd0022e55d370d5b /agent/pksign.c
parentsm: Support import and verification of EdDSA certificates. (diff)
downloadgnupg2-b18fb0264abdb6cb0a99ba0ba941dc9a6e35f74a.tar.xz
gnupg2-b18fb0264abdb6cb0a99ba0ba941dc9a6e35f74a.zip
agent: Allow to use SETHASH for arbitrary data.
* agent/agent.h (struct server_control_s): Add field digest.data. * agent/gpg-agent.c (agent_deinit_default_ctrl): Free that field. * agent/command.c (reset_notify): Ditto. (start_command_handler): ditto. (cmd_sethash): Add new option --inquire. * agent/call-scd.c (agent_card_pksign): For now return an error if inquire mode was used. * agent/command-ssh.c (ssh_handler_sign_request): Make sure digest.data is cleared. * agent/divert-scd.c (divert_pksign): Implement inquire mode. * agent/pksign.c (agent_pksign_do): Ditto. -- This is required to support EdDSA according to RFC8410. GnuPG-bug-id: 4888
Diffstat (limited to 'agent/pksign.c')
-rw-r--r--agent/pksign.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/pksign.c b/agent/pksign.c
index 3474f9434..76b0c3f85 100644
--- a/agent/pksign.c
+++ b/agent/pksign.c
@@ -304,6 +304,11 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce,
data = overridedata;
datalen = overridedatalen;
}
+ else if (ctrl->digest.data)
+ {
+ data = ctrl->digest.data;
+ datalen = ctrl->digest.valuelen;
+ }
else
{
data = ctrl->digest.value;