From c3dd53a65dc9ea2c4814e24079f0270c2fef14c6 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 18 Jun 2019 10:13:40 +0900 Subject: [PATCH] scd: KEYINFO: Send LF for --data. * scd/command.c (send_keyinfo): Send LF for --data. -- Fixes-commit: 01730529f20882cd98882a61408e9bee960c86f1 Signed-off-by: NIIBE Yutaka --- scd/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scd/command.c b/scd/command.c index 4f4005458..1929c33f1 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1885,9 +1885,11 @@ send_keyinfo (ctrl_t ctrl, int data, const char *keygrip_str, char *string; assuan_context_t ctx = ctrl->server_local->assuan_ctx; - string = xtryasprintf ("%s T %s %s", keygrip_str, + string = xtryasprintf ("%s T %s %s%s", keygrip_str, serialno? serialno : "-", - idstr? idstr : "-"); + idstr? idstr : "-", + data? "\n" : ""); + if (!string) return;