1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

scd,ccid: Fix detection of supported readers with pinpad.

* scd/ccid-driver.c (ccid_transceive_secure): When not supported,
return CCID_DRIVER_ERR_NOT_SUPPORTED.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2019-11-15 15:46:37 +09:00
parent 12def3a84e
commit 1cb9a831f6

View File

@ -3439,8 +3439,9 @@ ccid_transceive_secure (ccid_driver_t handle,
{ {
pininfo->maxlen = 25; pininfo->maxlen = 25;
enable_varlen = 1; enable_varlen = 1;
break;
} }
break; return CCID_DRIVER_ERR_NOT_SUPPORTED;
case VENDOR_GEMPC: case VENDOR_GEMPC:
if (handle->id_product == GEMPC_PINPAD) if (handle->id_product == GEMPC_PINPAD)
{ {
@ -3455,10 +3456,10 @@ ccid_transceive_secure (ccid_driver_t handle,
enable_varlen = 1; enable_varlen = 1;
break; break;
} }
break; return CCID_DRIVER_ERR_NOT_SUPPORTED;
default: default:
if ((handle->id_vendor == VENDOR_VEGA && if ((handle->id_vendor == VENDOR_VEGA &&
handle->id_product == VEGA_ALPHA)) handle->id_product == VEGA_ALPHA))
{ {
enable_varlen = 0; enable_varlen = 0;
pininfo->minlen = 4; pininfo->minlen = 4;