1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd:p15: Improve support for some CardOS based cards.

* scd/iso7816.c (iso7816_read_binary_ext): Add optional arg r_sw and
change callers.
(iso7816_read_record): Factor all code out to ...
(iso7816_read_record_ext): new.
* scd/app-p15.c (select_and_read_binary): Fallback to record reading.
(read_ef_aodf): Clear EOF error.
This commit is contained in:
Werner Koch 2020-11-25 15:27:21 +01:00
parent 60e1ce6612
commit c7b9a4ee43
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 68 additions and 14 deletions

View file

@ -142,9 +142,14 @@ gpg_error_t iso7816_get_challenge (int slot,
gpg_error_t iso7816_read_binary_ext (int slot, int extended_mode,
size_t offset, size_t nmax,
unsigned char **result, size_t *resultlen);
unsigned char **result, size_t *resultlen,
int *r_sw);
gpg_error_t iso7816_read_binary (int slot, size_t offset, size_t nmax,
unsigned char **result, size_t *resultlen);
gpg_error_t iso7816_read_record_ext (int slot, int recno, int reccount,
int short_ef,
unsigned char **result, size_t *resultlen,
int *r_sw);
gpg_error_t iso7816_read_record (int slot, int recno, int reccount,
int short_ef,
unsigned char **result, size_t *resultlen);