From e4ee706e270c38937afe26ce9f54d17d037cb86f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 9 Sep 2020 12:12:51 +0200 Subject: core: Fully implement the inquire callback for assuan_transact * src/engine-assuan.c (inquire_cb): Implement returning data. * tests/opassuan/t-command.c (inq_cb): Send some test data. -- The old code only allowed to send an empty response which was good enough for scdaemon's KNOWNCARDP inquire but not to send actual data. A quick test using a test smartcard might be ./t-command 'scd setattr --inquire PRIVATE-DO-1' and then reading the data back using gpg-connect-agent 'scd getattr PRIVATE-DO-1' /bye Signed-off-by: Werner Koch --- tests/opassuan/t-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/opassuan/t-command.c b/tests/opassuan/t-command.c index b7e184c4..2bc869d4 100644 --- a/tests/opassuan/t-command.c +++ b/tests/opassuan/t-command.c @@ -70,8 +70,9 @@ inq_cb (void *opaque, const char *name, const char *args, /* There shall be no data object. */ assert (!*r_data); - err = gpgme_data_new (&data); + err = gpgme_data_new_from_mem (&data, "Foo bar\nbaz\n", 10, 0); fail_if_err (err); + *r_data = data; printf (" sending data object %p\n", data); } @@ -142,4 +143,3 @@ main (int argc, char **argv) return 0; } - -- cgit v1.2.3