mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Support "acknowledge button" feature.
* scd/apdu.c (set_prompt_cb): New member function. (set_prompt_cb_ccid_reader): New function. (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader. (apdu_set_prompt_cb): New. * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb. * ccid-driver.c (ccid_set_prompt_cb): New. (bulk_in): Call ->prompt_cb when timer extension. * scd/command.c (popup_prompt): New. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
827529339a
commit
7a5a4c4cac
7 changed files with 97 additions and 1 deletions
|
@ -1898,6 +1898,34 @@ send_status_direct (ctrl_t ctrl, const char *keyword, const char *args)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
popup_prompt (void *opaque, int on)
|
||||
{
|
||||
ctrl_t ctrl = opaque;
|
||||
|
||||
if (ctrl)
|
||||
{
|
||||
assuan_context_t ctx = ctrl->server_local->assuan_ctx;
|
||||
|
||||
if (ctx)
|
||||
{
|
||||
const char *cmd;
|
||||
gpg_error_t err;
|
||||
unsigned char *value;
|
||||
size_t valuelen;
|
||||
|
||||
if (on)
|
||||
cmd = "POPUPPINPADPROMPT --ack";
|
||||
else
|
||||
cmd = "DISMISSPINPADPROMPT";
|
||||
err = assuan_inquire (ctx, cmd, &value, &valuelen, 100);
|
||||
if (!err)
|
||||
xfree (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Helper to send the clients a status change notification. */
|
||||
void
|
||||
send_client_notifications (app_t app, int removal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue