Compare commits
10 Commits
3b7516ac98
...
57fa71cdbd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57fa71cdbd | ||
|
|
19c118601b | ||
|
|
3eebf08efb | ||
|
|
e185f4100a | ||
|
|
d9f8afe600 | ||
|
|
e63e256b67 | ||
|
|
85082844eb | ||
|
|
bb02a0e9fc | ||
|
|
31703e848b | ||
|
|
16a276b0cb |
57
0001-Fix-SafeNet-eToken-5110-SC-issue.patch
Normal file
57
0001-Fix-SafeNet-eToken-5110-SC-issue.patch
Normal file
@ -0,0 +1,57 @@
|
||||
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)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
35
0002-Fix-SafeNet-eToken-5110-SC-issue-firmware-0.13.patch
Normal file
35
0002-Fix-SafeNet-eToken-5110-SC-issue-firmware-0.13.patch
Normal file
@ -0,0 +1,35 @@
|
||||
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;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Binary file not shown.
BIN
ccid-1.4.36.tar.bz2
Normal file
BIN
ccid-1.4.36.tar.bz2
Normal file
Binary file not shown.
28
ccid.spec
28
ccid.spec
@ -1,15 +1,18 @@
|
||||
%global dropdir %(pkg-config libpcsclite --variable usbdropdir 2>/dev/null)
|
||||
|
||||
Name: ccid
|
||||
Version: 1.4.29
|
||||
Release: 5
|
||||
Version: 1.4.36
|
||||
Release: 2
|
||||
Summary: Provide a generic USB CCID driver and ICCD
|
||||
License: LGPLv2+
|
||||
URL: https://ccid.apdu.fr/files/
|
||||
|
||||
Source0: https://ccid.apdu.fr/files/ccid-%{version}.tar.bz2
|
||||
|
||||
BuildRequires: perl-interpreter perl-Getopt-Long libusb1-devel gnupg2 gcc git
|
||||
Patch1: 0001-Fix-SafeNet-eToken-5110-SC-issue.patch
|
||||
Patch2: 0002-Fix-SafeNet-eToken-5110-SC-issue-firmware-0.13.patch
|
||||
|
||||
BuildRequires: perl-interpreter perl-Getopt-Long libusb1-devel gnupg2 gcc
|
||||
BuildRequires: pcsc-lite-devel >= 1.8.9
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
@ -24,7 +27,7 @@ Interface Devices) driver and ICCD (Integrated Circuit(s) Card Devices).See the
|
||||
USB CCID and ICCD specifications from the USB working group.
|
||||
|
||||
%prep
|
||||
%autosetup -n ccid-%{version} -p1 -S git
|
||||
%autosetup -n ccid-%{version} -p1
|
||||
|
||||
%build
|
||||
%configure --enable-twinserial
|
||||
@ -41,13 +44,28 @@ cp -p src/openct/LICENSE LICENSE.openct
|
||||
/bin/systemctl try-restart pcscd.service &>/dev/null || :
|
||||
|
||||
%files
|
||||
%doc AUTHORS ChangeLog README
|
||||
%doc AUTHORS ChangeLog README.md
|
||||
%license COPYING LICENSE.openct
|
||||
%{dropdir}/ifd-ccid.bundle/
|
||||
%{dropdir}/serial/
|
||||
%config(noreplace) %{_sysconfdir}/reader.conf.d/libccidtwin
|
||||
|
||||
%changelog
|
||||
* Thu Oct 20 2022 liusirui <liusirui@huawei.com> - 1.4.36-2
|
||||
- backport some patches to fix some problems.
|
||||
|
||||
* Tue Nov 23 2021 Li Jinlin <lijinlin3@huawei.com> - 1.4.36-1
|
||||
- update to 1.4.36 version
|
||||
|
||||
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.4.33-3
|
||||
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
||||
|
||||
* Fri Oct 30 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 1.4.33-2
|
||||
- backport some patches to fix some problems.
|
||||
|
||||
* Tue Jul 21 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 1.4.33-1
|
||||
- update to 1.4.33 version
|
||||
|
||||
* Sun Jul 5 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.4.29-5
|
||||
- remove useless readme files.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user