diff options
author | Werner Koch <wk@gnupg.org> | 2003-09-30 19:35:05 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-09-30 19:35:05 +0200 |
commit | 59a61b3c93f6a109f1e1bfe94fd0ab4a28169a9e (patch) | |
tree | 6c9cf4322312c53c9bb9b928ff9b79c426cff6b0 /scd/app.c | |
parent | * keylist.c (print_card_serialno): New. (diff) | |
download | gnupg2-59a61b3c93f6a109f1e1bfe94fd0ab4a28169a9e.tar.xz gnupg2-59a61b3c93f6a109f1e1bfe94fd0ab4a28169a9e.zip |
* 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.
Diffstat (limited to 'scd/app.c')
-rw-r--r-- | scd/app.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -125,6 +125,19 @@ app_write_learn_status (APP app, CTRL ctrl) } +/* Perform a GETATTR operation. */ +int +app_getattr (APP app, CTRL ctrl, const char *name) +{ + if (!app || !name || !*name) + return gpg_error (GPG_ERR_INV_VALUE); + if (!app->initialized) + return gpg_error (GPG_ERR_CARD_NOT_INITIALIZED); + if (!app->fnc.getattr) + return gpg_error (GPG_ERR_UNSUPPORTED_OPERATION); + return app->fnc.getattr (app, ctrl, name); +} + /* Perform a SETATTR operation. */ int app_setattr (APP app, const char *name, |