[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.29-7-ga63fdda

by NIIBE Yutaka cvs at cvs.gnupg.org
Thu Sep 17 04:34:29 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-0 has been updated
       via  a63fddad6808763e2916d0e7e6972ed025a0f336 (commit)
      from  d289341371bae6405c2100a0c515c6322a2f0319 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a63fddad6808763e2916d0e7e6972ed025a0f336
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Sep 17 11:21:44 2015 +0900

    scd: Fix ccid-driver timeout for OpenPGPcard v2.1.
    
    * scd/ccid-driver.c (CCID_CMD_TIMEOUT): New.
    (ccid_transceive_apdu_level, ccid_transceive): Use.
    
    --
    
    It is reported that key generation causes timeout with OpenPGPcard
    v2.1.  Ideally, timeout value could be determined at run-time by
    examining card's ATR.  Compile-time fixed value is OK for internal
    CCID driver.
    
    (cherry-picked from 2.1 6510df3a7cd2b5bf44fac1e4d50ee54b8c897daa)

diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 8a68a44..8f9c1bd 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -109,6 +109,9 @@
 */
 #define CCID_MAX_BUF (2048+7+10)
 
+/* CCID command timeout.  OpenPGPcard v2.1 requires timeout of 13 seconds.  */
+#define CCID_CMD_TIMEOUT (13*1000)
+
 /* Depending on how this source is used we either define our error
    output to go to stderr or to the jnlib based logging functions.  We
    use the latter when GNUPG_MAJOR_VERSION is defines or when both,
@@ -2885,7 +2888,7 @@ ccid_transceive_apdu_level (ccid_driver_t handle,
       apdu_len -= apdu_part_len;
 
       rc = bulk_in (handle, msg, sizeof msg, &msglen,
-                    RDR_to_PC_DataBlock, seqno, 5000, 0);
+                    RDR_to_PC_DataBlock, seqno, CCID_CMD_TIMEOUT, 0);
       if (rc)
         return rc;
 
@@ -2920,7 +2923,7 @@ ccid_transceive_apdu_level (ccid_driver_t handle,
         return rc;
 
       rc = bulk_in (handle, msg, sizeof msg, &msglen,
-                    RDR_to_PC_DataBlock, seqno, 5000, 0);
+                    RDR_to_PC_DataBlock, seqno, CCID_CMD_TIMEOUT, 0);
       if (rc)
         return rc;
     }
@@ -3129,7 +3132,7 @@ ccid_transceive (ccid_driver_t handle,
       msg = recv_buffer;
       rc = bulk_in (handle, msg, sizeof recv_buffer, &msglen,
                     via_escape? RDR_to_PC_Escape : RDR_to_PC_DataBlock,
-                    seqno, 5000, 0);
+                    seqno, CCID_CMD_TIMEOUT, 0);
       if (rc)
         return rc;
 

-----------------------------------------------------------------------

Summary of changes:
 scd/ccid-driver.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list