scd: Fix timeout handling for key generation.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 27 Mar 2017 02:25:00 +0000 (11:25 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 27 Mar 2017 02:25:00 +0000 (11:25 +0900)
commit0848cfcce738150b53bfb65b78efc1e6dc9f3d26
tree8963ca0113c698c6e0fa25cd21089897084c4d72
parent0b3770c421a35b64823a805fa8d49ddd5c653d50
scd: Fix timeout handling for key generation.

* scd/ccid-driver.c (CCID_CMD_TIMEOUT): Back to original value.
(CCID_CMD_TIMEOUT_LONGER): New.
(ccid_transceive): Add kludge for key generation.

--

At key generation of longer key size, OpenPGP card sends back "time
extension" with BWI=100, which is unusual value in the protocol and it
actually requires host having longer timeout like 43 seconds.

Reported-by: Szczepan Zalega <szczepan@nitrokey.com>
Fixes-commit: 6510df3a7cd2b5bf44fac1e4d50ee54b8c897daa
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/ccid-driver.c