mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* command.c (cmd_getattr): New command GETATTR.
* app.c (app_setattr): New. (do_getattr): New. (do_learn_status): Reimplemented in terms of do_getattr. * app-openpgp.c (do_change_pin): Make sure CVH1 and CHV2 are always synced. (verify_chv2, verify_chv3): New. Factored out common code. (do_setattr, do_sign, do_auth, do_decipher): Change the names of the prompts to match that we have only 2 different PINs. (app_select_openpgp): Check whether the card enforced CHV1. (convert_sig_counter_value): New. Factor out code from get_sig_counter.
This commit is contained in:
parent
316dc2fd60
commit
59a61b3c93
5 changed files with 329 additions and 238 deletions
|
@ -31,10 +31,12 @@ struct app_ctx_s {
|
|||
size_t serialnolen; /* Length in octets of serialnumber. */
|
||||
unsigned int card_version;
|
||||
int did_chv1;
|
||||
int force_chv1; /* True if the card does not cache CHV1. */
|
||||
int did_chv2;
|
||||
int did_chv3;
|
||||
struct {
|
||||
int (*learn_status) (APP app, CTRL ctrl);
|
||||
int (*getattr) (APP app, CTRL ctrl, const char *name);
|
||||
int (*setattr) (APP app, const char *name,
|
||||
int (*pincb)(void*, const char *, char **),
|
||||
void *pincb_arg,
|
||||
|
@ -73,6 +75,7 @@ void app_set_default_reader_port (const char *portstr);
|
|||
APP select_application (void);
|
||||
int app_get_serial_and_stamp (APP app, char **serial, time_t *stamp);
|
||||
int app_write_learn_status (APP app, CTRL ctrl);
|
||||
int app_getattr (APP app, CTRL ctrl, const char *name);
|
||||
int app_setattr (APP app, const char *name,
|
||||
int (*pincb)(void*, const char *, char **),
|
||||
void *pincb_arg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue