mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
scd: Factor common PIN status check out.
* scd/iso7816.h (ISO7816_VERIFY_ERROR): New. (ISO7816_VERIFY_NO_PIN): New. (ISO7816_VERIFY_BLOCKED): New. (ISO7816_VERIFY_NULLPIN): New. (ISO7816_VERIFY_NOT_NEEDED): New. * scd/iso7816.c (iso7816_verify_status): New. * scd/app-nks.c (get_chv_status): Use new function. -- Signed-off-by: Werner Koch <wk@gnupg.org> Backported from master: - Removed the non-existant app-piv.c patches. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
471b06e91b
commit
9497d25c56
4 changed files with 49 additions and 42 deletions
|
@ -29,6 +29,15 @@
|
|||
#define ISO7816_CHANGE_REFERENCE_DATA 0x24
|
||||
#define ISO7816_RESET_RETRY_COUNTER 0x2C
|
||||
|
||||
/* Error codes returned by iso7816_verify_status. A non-negative
|
||||
* number gives the number of left tries.
|
||||
* NB: The values are also used by the CHV-STATUS lines and thus are
|
||||
* part of the public interface. Do not change them. */
|
||||
#define ISO7816_VERIFY_ERROR (-1)
|
||||
#define ISO7816_VERIFY_NO_PIN (-2)
|
||||
#define ISO7816_VERIFY_BLOCKED (-3)
|
||||
#define ISO7816_VERIFY_NULLPIN (-4)
|
||||
#define ISO7816_VERIFY_NOT_NEEDED (-5)
|
||||
|
||||
/* Information to be passed to pinpad equipped readers. See
|
||||
ccid-driver.c for details. */
|
||||
|
@ -71,6 +80,7 @@ gpg_error_t iso7816_check_pinpad (int slot, int command,
|
|||
gpg_error_t iso7816_verify (int slot,
|
||||
int chvno, const char *chv, size_t chvlen);
|
||||
gpg_error_t iso7816_verify_kp (int slot, int chvno, pininfo_t *pininfo);
|
||||
int iso7816_verify_status (int slot, int chvno);
|
||||
gpg_error_t iso7816_change_reference_data (int slot, int chvno,
|
||||
const char *oldchv, size_t oldchvlen,
|
||||
const char *newchv, size_t newchvlen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue