summaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-03-16 18:52:38 +0100
committerWerner Koch <wk@gnupg.org>2021-03-16 18:52:38 +0100
commitbf1d7bc3697c7d650994ba94d3704af189594657 (patch)
tree145d5c2e2faa316702f657f5be741a0b70728f28 /scd/command.c
parentcard: Generalize the CHV counter printing. (diff)
downloadgnupg2-bf1d7bc3697c7d650994ba94d3704af189594657.tar.xz
gnupg2-bf1d7bc3697c7d650994ba94d3704af189594657.zip
scd:p15: Implement CHV-STATUS attribute
* scd/command.c (send_status_direct): Return an error. * scd/app-p15.c (do_learn_status): Emit CHV-STATUS. (compare_aodf_objid): New. (do_getattr): Implement CHV-STATUS.
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/scd/command.c b/scd/command.c
index 0e5bcdc42..77e253ddc 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2458,15 +2458,17 @@ send_status_info (ctrl_t ctrl, const char *keyword, ...)
/* Send a ready formatted status line via assuan. */
-void
+gpg_error_t
send_status_direct (ctrl_t ctrl, const char *keyword, const char *args)
{
assuan_context_t ctx = ctrl->server_local->assuan_ctx;
if (strchr (args, '\n'))
- log_error ("error: LF detected in status line - not sending\n");
- else
- assuan_write_status (ctx, keyword, args);
+ {
+ log_error ("error: LF detected in status line - not sending\n");
+ return gpg_error (GPG_ERR_INTERNAL);
+ }
+ return assuan_write_status (ctx, keyword, args);
}