Home GnuPG
Diffusion GnuPG 5b985b026418

scd: Map some error codes from libusb to ccid-driver error codes.

Description

scd: Map some error codes from libusb to ccid-driver error codes.

* scd/ccid-driver.h (CCID_DRIVER_ERR_USB_*): New error codes.
* scd/apdu.h: New SW_HOST error codes.
* scd/apdu.c (host_sw_string): Print them
* scd/ccid-driver.c (map_libusb_error): New.
(ccid_open_usb_reader, bulk_in, abort_cmd): Map libusb error codes.
* scd/iso7816.c (map_sw): Map new codes to gpg-error.

Backport from master commit:

9a8d7e41bba1926158a21ebdda542241493ef983

This change will help to get low level error conditions from hipher
application code.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Aug 12 2020, 4:06 PM
gniibeCommitted on Oct 6 2020, 4:14 AM
Parents
rGcccdca61a841: scd: internal driver: Submit SET_INTERFACE control transfer.
Branches
Unknown
Tags
Unknown