diff options
author | Werner Koch <[email protected]> | 2004-04-27 08:23:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-04-27 08:23:45 +0000 |
commit | 577d9c2342f99ebf163d35519ab8adc573f26765 (patch) | |
tree | 0b5ecdd7f3f18987dd069573b03d4a1c55d64b53 /g10/apdu.h | |
parent | * getkey.c (get_seckey_byname2): Significantly simplify this function by (diff) | |
download | gnupg-577d9c2342f99ebf163d35519ab8adc573f26765.tar.gz gnupg-577d9c2342f99ebf163d35519ab8adc573f26765.zip |
A bunch of changes for the openpgp card.
Diffstat (limited to '')
-rw-r--r-- | g10/apdu.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/g10/apdu.h b/g10/apdu.h index 21e2b9840..f74bab7fe 100644 --- a/g10/apdu.h +++ b/g10/apdu.h @@ -27,13 +27,16 @@ enum { SW_MORE_DATA = 0x6100, /* Note: that the low byte must be masked of.*/ + SW_EOF_REACHED = 0x6282, SW_EEPROM_FAILURE = 0x6581, SW_WRONG_LENGTH = 0x6700, SW_CHV_WRONG = 0x6982, SW_CHV_BLOCKED = 0x6983, SW_USE_CONDITIONS = 0x6985, - SW_NOT_SUPPORTED = 0x6a81, SW_BAD_PARAMETER = 0x6a80, /* (in the data field) */ + SW_NOT_SUPPORTED = 0x6a81, + SW_FILE_NOT_FOUND = 0x6a82, + SW_RECORD_NOT_FOUND = 0x6a83, SW_REF_NOT_FOUND = 0x6a88, SW_BAD_P0_P1 = 0x6b00, SW_INS_NOT_SUP = 0x6d00, @@ -45,9 +48,12 @@ enum { those values can't be issued by a card. */ SW_HOST_OUT_OF_CORE = 0x10001, /* No way yet to differentiate between errnos on a failed malloc. */ - SW_HOST_INV_VALUE = 0x10002, + SW_HOST_INV_VALUE = 0x10002, SW_HOST_INCOMPLETE_CARD_RESPONSE = 0x10003, - SW_HOST_NO_DRIVER = 0x10004 + SW_HOST_NO_DRIVER = 0x10004, + SW_HOST_NOT_SUPPORTED = 0x10005, + SW_HOST_LOCKING_FAILED= 0x10006, + SW_HOST_BUSY = 0x10007 }; @@ -55,10 +61,14 @@ enum { /* Note , that apdu_open_reader returns no status word but -1 on error. */ int apdu_open_reader (const char *portstr); int apdu_close_reader (int slot); +int apdu_enum_reader (int slot, int *used); unsigned char *apdu_get_atr (int slot, size_t *atrlen); /* The apdu send functions do return status words. */ +int apdu_reset (int slot); +int apdu_get_status (int slot, int hang, + unsigned int *status, unsigned int *changed); int apdu_send_simple (int slot, int class, int ins, int p0, int p1, int lc, const char *data); int apdu_send (int slot, int class, int ins, int p0, int p1, |