summaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2005-01-26 23:33:11 +0100
committerMoritz Schulte <mo@g10code.com>2005-01-26 23:33:11 +0100
commit0cb7a855abde6df462c9333ac59d4675cdad790a (patch)
tree3c03fafd9ee71aa92eaed1e55c56a486cb8be058 /agent
parentadded missing file (diff)
downloadgnupg2-0cb7a855abde6df462c9333ac59d4675cdad790a.tar.xz
gnupg2-0cb7a855abde6df462c9333ac59d4675cdad790a.zip
2005-01-26 Moritz Schulte <moritz@g10code.com>
* command-ssh.c (ssh_handler_sign_request): Confirm to agent protocol in case of failure.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/command-ssh.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 051ed911e..8c6444b25 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,6 +1,10 @@
2005-01-26 Moritz Schulte <moritz@g10code.com>
+ * command-ssh.c (ssh_handler_sign_request): Confirm to agent
+ protocol in case of failure.
+
* command-ssh.c: New file.
+
* Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.
* findkey.c (modify_description): New function.
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index a76bbfff7..4c13f5059 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -1706,14 +1706,14 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response)
if (! bad)
{
/* Done. */
- es_write_byte (response, SSH_RESPONSE_SIGN_RESPONSE);
- if (! es_ferror (response))
+ if (! err)
{
- if (! err)
+ es_write_byte (response, SSH_RESPONSE_SIGN_RESPONSE);
+ if (! es_ferror (response))
es_write_string (response, sig, sig_n);
- else
- es_write_byte (response, SSH_RESPONSE_FAILURE);
}
+ else
+ es_write_byte (response, SSH_RESPONSE_FAILURE);
}
gcry_sexp_release (key);