This commit is contained in:
Jakub Jelen 2023-06-08 16:41:26 +02:00 committed by root
parent e4ba343194
commit 8b4e33dabc
6 changed files with 10 additions and 100 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@
/ccid-1.4.33.tar.bz2.asc
/ccid-1.4.34.tar.bz2.asc
/ccid-1.4.36.tar.bz2.asc
/ccid-1.5.2.tar.bz2.asc

2
.pcsc-lite-ccid.metadata Normal file
View File

@ -0,0 +1,2 @@
24d246722f8415dcd4ddb7fc1ccf9c795f265900 ccid-1.5.2.tar.bz2
ed7a56804cd705999d0511b5195eb041bfab889e ccid-1.5.2.tar.bz2.asc

View File

@ -23,7 +23,7 @@ diff -up ccid-1.4.26/src/ccid.h.omnikey ccid-1.4.26/src/ccid.h
+++ ccid-1.4.26/src/ccid.h 2017-02-24 10:04:25.742132234 +0100
@@ -137,6 +137,7 @@ typedef struct
*/
char zlp;
bool zlp;
#endif
+ unsigned int dwNonStandardFlags;
} _ccid_descriptor;

View File

@ -1,94 +0,0 @@
From b48e1e697010431b7f03d4ecfe917ceee95e2c64 Mon Sep 17 00:00:00 2001
From: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Tue, 7 Sep 2021 14:06:46 +0200
Subject: [PATCH] Fix SafeNet eToken 5110 SC issue
Some SafeNet eToken 5100 (but not all) have issues when IFSD is negotiated.
For some APDU the communication stops and the token returns 0 bytes.
It is the case with the SafeNet eToken 5110 SC with
ATR: 3B D5 18 00 81 31 3A 7D 80 73 C8 21 10 30
and PC/SC name "SafeNet eToken 5100 [eToken 5110 SC]"
Another SafeNet eToken 5100 with
ATR: 3B D5 18 00 81 31 FE 7D 80 73 C8 21 10 F4
and PC/SC name "SafeNet eToken 5100 [Main Interface]"
does NOT have problems with the the IFSD negotiation.
This fixes Debian bug #993647
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993647
---
src/ccid.c | 7 +++++++
src/ccid.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/ccid.c b/src/ccid.c
index efef240..0d7ba54 100644
--- a/src/ccid.c
+++ b/src/ccid.c
@@ -576,6 +576,13 @@ int ccid_open_hack_post(unsigned int reader_index)
* have one */
ccid_descriptor->bPINSupport = 0;
break;
+
+ case SAFENET_ETOKEN_5100:
+ /* the old SafeNet eToken 5110 SC (firmware 0.12) does not
+ * like IFSD negotiation. So disable it. */
+ if (0x0012 == ccid_descriptor->IFD_bcdDevice)
+ ccid_descriptor->dwFeatures |= CCID_CLASS_AUTO_IFSD;
+ break;
}
/* Gemalto readers may report additional information */
diff --git a/src/ccid.h b/src/ccid.h
index b28f0c1..00ce07a 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -239,6 +239,7 @@ typedef struct
#define IDENTIV_uTrust3701F 0x04E65791
#define IDENTIV_uTrust4701F 0x04E65724
#define BIT4ID_MINILECTOR 0x25DD3111
+#define SAFENET_ETOKEN_5100 0x05290620
#define VENDOR_GEMALTO 0x08E6
#define GET_VENDOR(readerID) ((readerID >> 16) & 0xFFFF)
--
GitLab
From 26ad96076523472e9d0d383d014e7b1ad241fd5b Mon Sep 17 00:00:00 2001
From: Ludovic Rousseau <ludovic.rousseau@free.fr>
Date: Wed, 8 Sep 2021 11:28:48 +0200
Subject: [PATCH] Fix SafeNet eToken 5110 SC issue (firmware 0.13)
The SafeNet eToken 5110 SC with firmware 0.13 has the same problem as
the token with firmware 0.12.
We use the same oslution to fix the problem.
Thanks again to Vladimir K for the bug report.
---
src/ccid.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/ccid.c b/src/ccid.c
index 0d7ba54..21a2fe8 100644
--- a/src/ccid.c
+++ b/src/ccid.c
@@ -578,9 +578,10 @@ int ccid_open_hack_post(unsigned int reader_index)
break;
case SAFENET_ETOKEN_5100:
- /* the old SafeNet eToken 5110 SC (firmware 0.12) does not
- * like IFSD negotiation. So disable it. */
- if (0x0012 == ccid_descriptor->IFD_bcdDevice)
+ /* the old SafeNet eToken 5110 SC (firmware 0.12 & 0.13)
+ * does not like IFSD negotiation. So disable it. */
+ if ((0x0012 == ccid_descriptor->IFD_bcdDevice)
+ || (0x0013 == ccid_descriptor->IFD_bcdDevice))
ccid_descriptor->dwFeatures |= CCID_CLASS_AUTO_IFSD;
break;
}
--
GitLab

View File

@ -2,7 +2,7 @@
%global pcsc_lite_ver 1.8.9
Name: pcsc-lite-ccid
Version: 1.4.36
Version: 1.5.2
Release: 1%{?dist}
Summary: Generic USB CCID smart card reader driver
@ -13,7 +13,6 @@ Source1: https://ccid.apdu.fr/files/ccid-%{version}.tar.bz2.asc
Source2: gpgkey-F5E11B9FFE911146F41D953D78A1B4DFE8F9C57E.gpg
Patch0: ccid-1.4.26-omnikey-3121.patch
Patch1: ccid-1.4.34-maxreaders.patch
Patch2: ccid-1.4.36-etoken.patch
BuildRequires: make
BuildRequires: perl-interpreter
@ -41,7 +40,6 @@ gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%setup -q -n ccid-%{version}
%patch0 -p1 -b .omnikey
%patch1 -p0 -b .maxreaders
%patch2 -p1 -b .etoken
%build
%configure --enable-twinserial
@ -69,6 +67,9 @@ cp -p src/openct/LICENSE LICENSE.openct
%changelog
* Thu Jun 8 2023 Jakub Jelen <jjelen@redhat.com> - 1.5.2-1
- Rebase to current version from Fedora to fix support for Alcor Micro Corp. AU9540 (#2209457)
* Thu Nov 18 2021 Jakub Jelen <jjelen@redhat.com> - 1.4.36-1
- Rebase to current version from Fedora (#2017830)

View File

@ -1,2 +1,2 @@
SHA512 (ccid-1.4.36.tar.bz2) = e9ca3f5364c6cec988edad325c1ef1b35886e3ecb15d6e1409c989b9f669fbda3f0688e246e3976b58eacc0ed035cde36e65675abf12562e81c3630d4ce67773
SHA512 (ccid-1.4.36.tar.bz2.asc) = d9725a343fb0ac275bba96c42a497b3d2e4260699bb1d299c8838d9ceadc7a2629aa54b80ba04d99d0b6281e24a38cf8cc7c8e70cb8f7921ee338344883dd0df
SHA512 (ccid-1.5.2.tar.bz2) = 6f23b5b3d73f37bbb024d30aa76271e7937440da82a8cf302797b44a40cd04c7aaa1e87838d8b1a31e7459d744aa4e8e8c89ea79bd8ba4c7d5642493f0695e8d
SHA512 (ccid-1.5.2.tar.bz2.asc) = 3d7667e3f392d2388c4276b97dcf6fa40175ba6afc3eaa6263eb423e6c9e0aeacb7d677ac4dd14b851915298f29bbf835f69e0992b4ea17b56a5c945ec46964e