mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01:00
card: Display if KDF is enabled or not.
* g10/call-agent.h (kdf_do_enabled): New field. * g10/call-agent.c (learn_status_cb): Set kdf_do_enabled if available. * g10/card-util.c (current_card_status): Inform the availability. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
56022fb304
commit
a5542a4a70
@ -707,6 +707,10 @@ learn_status_cb (void *opaque, const char *line)
|
|||||||
xfree (parm->private_do[no]);
|
xfree (parm->private_do[no]);
|
||||||
parm->private_do[no] = unescape_status_string (line);
|
parm->private_do[no] = unescape_status_string (line);
|
||||||
}
|
}
|
||||||
|
else if (keywordlen == 3 && !memcmp (keyword, "KDF", 3))
|
||||||
|
{
|
||||||
|
parm->kdf_do_enabled = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ struct agent_card_info_s
|
|||||||
unsigned int bt:1; /* Button for confirmation available. */
|
unsigned int bt:1; /* Button for confirmation available. */
|
||||||
} extcap;
|
} extcap;
|
||||||
unsigned int status_indicator;
|
unsigned int status_indicator;
|
||||||
|
int kdf_do_enabled; /* Card has a KDF object */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -618,6 +618,11 @@ current_card_status (ctrl_t ctrl, estream_t fp,
|
|||||||
tty_fprintf (fp, "PIN retry counter : %d %d %d\n",
|
tty_fprintf (fp, "PIN retry counter : %d %d %d\n",
|
||||||
info.chvretry[0], info.chvretry[1], info.chvretry[2]);
|
info.chvretry[0], info.chvretry[1], info.chvretry[2]);
|
||||||
tty_fprintf (fp, "Signature counter : %lu\n", info.sig_counter);
|
tty_fprintf (fp, "Signature counter : %lu\n", info.sig_counter);
|
||||||
|
if (info.extcap.kdf)
|
||||||
|
{
|
||||||
|
tty_fprintf (fp, "KDF setting ......: %s\n",
|
||||||
|
info.kdf_do_enabled ? "on" : "off");
|
||||||
|
}
|
||||||
tty_fprintf (fp, "Signature key ....:");
|
tty_fprintf (fp, "Signature key ....:");
|
||||||
print_shax_fpr (fp, info.fpr1len? info.fpr1:NULL, info.fpr1len);
|
print_shax_fpr (fp, info.fpr1len? info.fpr1:NULL, info.fpr1len);
|
||||||
if (info.fpr1len && info.fpr1time)
|
if (info.fpr1len && info.fpr1time)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user