summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2014-05-08 04:46:38 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2014-05-08 04:46:38 +0200
commitfb24808db9af9dfe36f9f6d7fc24e0b903ecc12c (patch)
tree37b52aea7e74cb5cd1b9eb2602b85eace8213323
parentMake -jN work again. (diff)
downloadgnupg2-fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c.tar.xz
gnupg2-fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c.zip
agent: Fix auth key comment handling.
* agent/command-ssh.c (ssh_send_key_public): Handle the case with no comment.
-rw-r--r--agent/command-ssh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index a81468125..d619324cd 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -2331,7 +2331,9 @@ ssh_send_key_public (estream_t stream, gcry_sexp_t key,
else
{
err = ssh_key_extract_comment (key, &comment);
- if (!err)
+ if (err)
+ err = stream_write_cstring (stream, "(none)");
+ else
err = stream_write_cstring (stream, comment);
}
if (err)