diff options
author | Werner Koch <[email protected]> | 2020-09-09 10:12:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-09-09 10:13:20 +0000 |
commit | e4ee706e270c38937afe26ce9f54d17d037cb86f (patch) | |
tree | 5b0535c6d050f2cbe62cf43597e3cbf0688107c4 /tests | |
parent | qt: Update the documentation of ListAllKeysJob (diff) | |
download | gpgme-e4ee706e270c38937afe26ce9f54d17d037cb86f.tar.gz gpgme-e4ee706e270c38937afe26ce9f54d17d037cb86f.zip |
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 <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/opassuan/t-command.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } - |