diff options
author | Werner Koch <wk@gnupg.org> | 2020-11-27 11:14:30 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-11-27 11:14:30 +0100 |
commit | 0e34683a6c4b037aa50ca0f97ddb9d5c4e499084 (patch) | |
tree | 9ed6e896bfe1f0c9bb1fd4bca4529668f74980a5 /scd/apdu.c | |
parent | card: Netkey improvement for passwd. (diff) | |
download | gnupg2-0e34683a6c4b037aa50ca0f97ddb9d5c4e499084.tar.xz gnupg2-0e34683a6c4b037aa50ca0f97ddb9d5c4e499084.zip |
scd: New getinfo sub-command apdu_strerror.
* scd/apdu.c (apdu_strerror): Add missing status codes.
* scd/command.c (cmd_getinfo): New sub-command apdu_strerror.
--
This is quite handy for gpg-card's APDU command and avoids that we
need to duplicate the mapping table or put it into a shared file.
Diffstat (limited to 'scd/apdu.c')
-rw-r--r-- | scd/apdu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index a7512ee9a..9b473d56a 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -538,8 +538,12 @@ apdu_strerror (int rc) switch (rc) { case SW_EOF_REACHED : return "eof reached"; + case SW_TERM_STATE : return "termination state"; case SW_EEPROM_FAILURE : return "eeprom failure"; + case SW_ACK_TIMEOUT : return "ACK timeout"; case SW_WRONG_LENGTH : return "wrong length"; + case SW_SM_NOT_SUP : return "secure messaging not supported"; + case SW_CC_NOT_SUP : return "command chaining not supported"; case SW_CHV_WRONG : return "CHV wrong"; case SW_CHV_BLOCKED : return "CHV blocked"; case SW_REF_DATA_INV : return "referenced data invalidated"; @@ -548,12 +552,13 @@ apdu_strerror (int rc) case SW_NOT_SUPPORTED : return "not supported"; case SW_FILE_NOT_FOUND : return "file not found"; case SW_RECORD_NOT_FOUND:return "record not found"; - case SW_REF_NOT_FOUND : return "reference not found"; case SW_NOT_ENOUGH_MEMORY: return "not enough memory space in the file"; - case SW_INCONSISTENT_LC: return "Lc inconsistent with TLV structure."; + case SW_INCONSISTENT_LC: return "Lc inconsistent with TLV structure"; case SW_INCORRECT_P0_P1: return "incorrect parameters P0,P1"; case SW_BAD_LC : return "Lc inconsistent with P0,P1"; + case SW_REF_NOT_FOUND : return "reference not found"; case SW_BAD_P0_P1 : return "bad P0,P1"; + case SW_EXACT_LENGTH : return "exact length"; case SW_INS_NOT_SUP : return "instruction not supported"; case SW_CLA_NOT_SUP : return "class not supported"; case SW_SUCCESS : return "success"; |