mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
scd: fix Vega for Alpha reader.
* scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling and size of command. -- Signed-off-by: NIIBE Yutaka
This commit is contained in:
parent
5c5e52df4b
commit
54cbab29c7
@ -1534,6 +1534,7 @@ ccid_vendor_specific_init (ccid_driver_t handle)
|
|||||||
{
|
{
|
||||||
if (handle->id_vendor == VENDOR_VEGA && handle->id_product == VEGA_ALPHA)
|
if (handle->id_vendor == VENDOR_VEGA && handle->id_product == VEGA_ALPHA)
|
||||||
{
|
{
|
||||||
|
int r;
|
||||||
/*
|
/*
|
||||||
* Vega alpha has a feature to show retry counter on the pinpad
|
* Vega alpha has a feature to show retry counter on the pinpad
|
||||||
* display. But it assumes that the card returns the value of
|
* display. But it assumes that the card returns the value of
|
||||||
@ -1542,9 +1543,12 @@ ccid_vendor_specific_init (ccid_driver_t handle)
|
|||||||
* VERIFY command with empty data. This vendor specific command
|
* VERIFY command with empty data. This vendor specific command
|
||||||
* sequence is to disable the feature.
|
* sequence is to disable the feature.
|
||||||
*/
|
*/
|
||||||
const unsigned char cmd[] = "\xb5\x01\x00\x03\x00";
|
const unsigned char cmd[] = { '\xb5', '\x01', '\x00', '\x03', '\x00' };
|
||||||
|
|
||||||
return send_escape_cmd (handle, cmd, sizeof (cmd), NULL, 0, NULL);
|
r = send_escape_cmd (handle, cmd, sizeof (cmd), NULL, 0, NULL);
|
||||||
|
if (r != 0 && r != CCID_DRIVER_ERR_CARD_INACTIVE
|
||||||
|
&& r != CCID_DRIVER_ERR_NO_CARD)
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user