mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
card: Display UIF setting.
* g10/call-agent.h (agent_card_info_s): Add UIF fields. * g10/call-agent.c (learn_status_cb): Put UIF DOs info. * g10/card-util.c (current_card_status): Output for UIF. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
05d163aebc
commit
e955ca245e
@ -711,6 +711,17 @@ learn_status_cb (void *opaque, const char *line)
|
||||
{
|
||||
parm->kdf_do_enabled = 1;
|
||||
}
|
||||
else if (keywordlen == 5 && !memcmp (keyword, "UIF-", 4)
|
||||
&& strchr("123", keyword[4]))
|
||||
{
|
||||
unsigned char *data;
|
||||
int no = keyword[4] - '1';
|
||||
|
||||
log_assert (no >= 0 && no <= 2);
|
||||
data = unescape_status_string (line);
|
||||
parm->uif[no] = (data[0] != 0xff);
|
||||
xfree (data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ struct agent_card_info_s
|
||||
unsigned int bt:1; /* Button for confirmation available. */
|
||||
} extcap;
|
||||
unsigned int status_indicator;
|
||||
int kdf_do_enabled; /* Card has a KDF object */
|
||||
int kdf_do_enabled; /* True if card has a KDF object. */
|
||||
int uif[3]; /* True if User Interaction Flag is on. */
|
||||
};
|
||||
|
||||
|
||||
|
@ -516,6 +516,11 @@ current_card_status (ctrl_t ctrl, estream_t fp,
|
||||
{
|
||||
es_fprintf (fp, "kdf:%s:\n", info.kdf_do_enabled ? "on" : "off");
|
||||
}
|
||||
if (info.extcap.bt)
|
||||
{
|
||||
es_fprintf (fp, "uif:%d:%d:%d:\n",
|
||||
info.uif[0], info.uif[1], info.uif[2]);
|
||||
}
|
||||
|
||||
for (i=0; i < 4; i++)
|
||||
{
|
||||
@ -627,6 +632,12 @@ current_card_status (ctrl_t ctrl, estream_t fp,
|
||||
tty_fprintf (fp, "KDF setting ......: %s\n",
|
||||
info.kdf_do_enabled ? "on" : "off");
|
||||
}
|
||||
if (info.extcap.bt)
|
||||
{
|
||||
tty_fprintf (fp, "UIF setting ......: Sign=%s Decrypt=%s Auth=%s\n",
|
||||
info.uif[0] ? "on" : "off", info.uif[1] ? "on" : "off",
|
||||
info.uif[2] ? "on" : "off");
|
||||
}
|
||||
tty_fprintf (fp, "Signature key ....:");
|
||||
print_shax_fpr (fp, info.fpr1len? info.fpr1:NULL, info.fpr1len);
|
||||
if (info.fpr1len && info.fpr1time)
|
||||
|
Loading…
x
Reference in New Issue
Block a user