aboutsummaryrefslogtreecommitdiffstats
path: root/scd/apdu.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-02-23 11:56:42 +0000
committerWerner Koch <[email protected]>2021-02-23 11:56:42 +0000
commit33aaa37e5bc0beb75305cdf9d8be850daccaee5e (patch)
tree7ab0774072679e01afd912a513e624fc9884bba9 /scd/apdu.h
parentscd: Fix readkey --info in case a readkey command is available. (diff)
downloadgnupg-33aaa37e5bc0beb75305cdf9d8be850daccaee5e.tar.gz
gnupg-33aaa37e5bc0beb75305cdf9d8be850daccaee5e.zip
scd:p15: Make it code work again for D-Trust cards.
* scd/app-p15.c (select_and_read_binary): Allow to skip the select. (select_and_read_record): Return the statusword. Silence error message for SW_FILE_STRUCT. (select_ef_by_path): Fix selection with a home_DF. (read_first_record): Fallback to read_binary for CardOS and return info about this. (read_ef_prkdf): Use info from read_first_record to decide whether to use record or binary mode. (read_ef_pukdf): Ditto. (read_ef_aodf): Ditto. (read_ef_cdf): Ditto. New arg cdftype for diagnostics. (read_p15_info): Pass cdftype. * scd/apdu.h (SW_FILE_STRUCT): New. * scd/apdu.c (apdu_strerror): Map that one to a string. * scd/iso7816.c (map_sw): and to a gpg-error.
Diffstat (limited to 'scd/apdu.h')
-rw-r--r--scd/apdu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/scd/apdu.h b/scd/apdu.h
index fd03ae6f0..2d89d68d9 100644
--- a/scd/apdu.h
+++ b/scd/apdu.h
@@ -35,6 +35,7 @@ enum {
SW_WRONG_LENGTH = 0x6700,
SW_SM_NOT_SUP = 0x6882, /* Secure Messaging is not supported. */
SW_CC_NOT_SUP = 0x6884, /* Command Chaining is not supported. */
+ SW_FILE_STRUCT = 0x6981, /* Command can't be used for file structure. */
SW_CHV_WRONG = 0x6982,
SW_CHV_BLOCKED = 0x6983,
SW_REF_DATA_INV = 0x6984, /* Referenced data invalidated. */