[Pcsclite-git-commit] [CCID] 02/02: PowerOn: change default voltage strategy

Ludovic Rousseau rousseau at moszumanska.debian.org
Mon Oct 3 15:55:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit ea7bedd2b3d30a884f43544c44f87ef779f011ef
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Mon Oct 3 11:50:24 2016 +0200

    PowerOn: change default voltage strategy
    
    The CCID 1.1 indicates page 105 in ch. "9.3 Voltage management" that the
    driver should use growing voltage when supported by the reader.
    
    So the default is now to use the sequence 1.8V, 3V and 5V.
    
    ISO 7816-3 is not clear about this point. No specific order is given in
    ch. 6.2.4 "Class selection" of ISO/IEC 7816-3:2006(E).
    
    This change should fix RedHat bug 1380615 "Coolkey cards do not work in
    Fedora" and avoid the RedHat only patch described in RedHat bug 1033788
    "Safenet SC650 smart cards are not detected"
    
    The RedHat patch is
    https://git.centos.org/blob/rpms!pcsc-lite-ccid/3dd85f55c8aacfa0704849e7b6cf46d4970b747b/SOURCES!ccid-1.4.10-voltage.patch
---
 src/ccid.h       | 7 ++++++-
 src/ifdhandler.c | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ccid.h b/src/ccid.h
index 77ec559..8010c10 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -236,9 +236,14 @@ typedef struct
  * 0 -> automatic (selection made by the reader)
  */
 /*
- * To be safe we default to 5V
+ * The default was to start at 5V
  * otherwise we would have to parse the ATR and get the value of TAi (i>2) when
  * in T=15
+ *
+ * The CCID 1.1 indicates page 105 in ch. "9.3 Voltage management"
+ * that the driver should use growing voltage when supported by the
+ * reader.
+ * So the default is now to use the sequence 1.8V, 3V and 5V.
  */
 #define VOLTAGE_AUTO 0
 #define VOLTAGE_5V 1
diff --git a/src/ifdhandler.c b/src/ifdhandler.c
index b22961e..c36f10f 100644
--- a/src/ifdhandler.c
+++ b/src/ifdhandler.c
@@ -65,7 +65,7 @@ static pthread_mutex_t ifdh_context_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 int LogLevel = DEBUG_LEVEL_CRITICAL | DEBUG_LEVEL_INFO;
 int DriverOptions = 0;
-int PowerOnVoltage = VOLTAGE_5V;
+int PowerOnVoltage = VOLTAGE_1_8V;
 static int DebugInitialized = FALSE;
 
 /* local functions */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list