import opensc-0.19.0-7.el8
This commit is contained in:
parent
66525fea0f
commit
6cb8f64c08
48
SOURCES/opensc-0.19.0-coolkey-2k.patch
Normal file
48
SOURCES/opensc-0.19.0-coolkey-2k.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From 6c1b9094a6060d9d838bac9ea4f7c4c9e755c4ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Ross <sross@forcepoint.com>
|
||||||
|
Date: Wed, 14 Nov 2018 11:59:43 -0600
|
||||||
|
Subject: [PATCH] Enable CoolKey driver to handle 2048-bit keys.
|
||||||
|
|
||||||
|
For a problem description, see <https://github.com/OpenSC/OpenSC/issues/1524>.
|
||||||
|
In a nutshell, for a card with the CoolKey applet and 2048-bit keys,
|
||||||
|
the command
|
||||||
|
pkcs11-tool --test --login
|
||||||
|
fails to complete all of its tests.
|
||||||
|
|
||||||
|
This commit consists of a patch from @dengert.
|
||||||
|
|
||||||
|
To avoid triggering an error when the data exceeds 255 bytes, this commit
|
||||||
|
limits the amount of the payload sent to the CoolKey applet on the card based
|
||||||
|
on the maximum amount of data that the card can receive, and overhead bytes
|
||||||
|
(namely, a header and nonce) that accompany the payload.
|
||||||
|
|
||||||
|
With this change, the command
|
||||||
|
pkcs11-tool --test --login
|
||||||
|
succeeds.
|
||||||
|
---
|
||||||
|
src/libopensc/card-coolkey.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/libopensc/card-coolkey.c b/src/libopensc/card-coolkey.c
|
||||||
|
index e320290dfe..11c4e92643 100644
|
||||||
|
--- a/src/libopensc/card-coolkey.c
|
||||||
|
+++ b/src/libopensc/card-coolkey.c
|
||||||
|
@@ -1168,12 +1168,16 @@ static int coolkey_write_object(sc_card_t *card, unsigned long object_id,
|
||||||
|
size_t operation_len;
|
||||||
|
size_t left = buf_len;
|
||||||
|
int r;
|
||||||
|
+ size_t max_operation_len;
|
||||||
|
+
|
||||||
|
+ /* set limit for the card's maximum send size and short write */
|
||||||
|
+ max_operation_len = MIN(COOLKEY_MAX_CHUNK_SIZE, (card->max_send_size - sizeof(coolkey_read_object_param_t) - nonce_size));
|
||||||
|
|
||||||
|
ulong2bebytes(¶ms.head.object_id[0], object_id);
|
||||||
|
|
||||||
|
do {
|
||||||
|
ulong2bebytes(¶ms.head.offset[0], offset);
|
||||||
|
- operation_len = MIN(left, COOLKEY_MAX_CHUNK_SIZE);
|
||||||
|
+ operation_len = MIN(left, max_operation_len);
|
||||||
|
params.head.length = operation_len;
|
||||||
|
memcpy(params.buf, buf, operation_len);
|
||||||
|
r = coolkey_apdu_io(card, COOLKEY_CLASS, COOLKEY_INS_WRITE_OBJECT, 0, 0,
|
||||||
|
|
1674
SOURCES/opensc-0.19.0-idprime.patch
Normal file
1674
SOURCES/opensc-0.19.0-idprime.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: opensc
|
Name: opensc
|
||||||
Version: 0.19.0
|
Version: 0.19.0
|
||||||
Release: 5%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: Smart card library and applications
|
Summary: Smart card library and applications
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -27,6 +27,10 @@ Patch5: opensc-0.19.0-cac1.patch
|
|||||||
Patch6: opensc-0.19.0-pinpad.patch
|
Patch6: opensc-0.19.0-pinpad.patch
|
||||||
# https://github.com/OpenSC/OpenSC/pull/1549
|
# https://github.com/OpenSC/OpenSC/pull/1549
|
||||||
Patch7: opensc-0.19.0-dual.patch
|
Patch7: opensc-0.19.0-dual.patch
|
||||||
|
# https://github.com/OpenSC/OpenSC/pull/1772
|
||||||
|
Patch8: opensc-0.19.0-idprime.patch
|
||||||
|
# https://github.com/OpenSC/OpenSC/pull/1532
|
||||||
|
Patch9: opensc-0.19.0-coolkey-2k.patch
|
||||||
|
|
||||||
BuildRequires: pcsc-lite-devel
|
BuildRequires: pcsc-lite-devel
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
@ -60,6 +64,8 @@ every software/card that does so, too.
|
|||||||
%patch5 -p1 -b .cac1
|
%patch5 -p1 -b .cac1
|
||||||
%patch6 -p1 -b .pinpad
|
%patch6 -p1 -b .pinpad
|
||||||
%patch7 -p1 -b .dual
|
%patch7 -p1 -b .dual
|
||||||
|
%patch8 -p1 -b .idprime
|
||||||
|
%patch9 -p1 -b .coolkey-2k
|
||||||
|
|
||||||
cp -p src/pkcs15init/README ./README.pkcs15init
|
cp -p src/pkcs15init/README ./README.pkcs15init
|
||||||
cp -p src/scconf/README.scconf .
|
cp -p src/scconf/README.scconf .
|
||||||
@ -211,6 +217,13 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 25 2019 Jakub Jelen <jjelen@redhat.com> - 0.19.0-7
|
||||||
|
- Unbreak RSA-PSS mechanisms in -6 release (#1775673)
|
||||||
|
|
||||||
|
* Thu Nov 14 2019 Jakub Jelen <jjelen@redhat.com> - 0.19.0-6
|
||||||
|
- Add support for Gemalto IDPrime smart cards (#1657970)
|
||||||
|
- Fix 2k RSA key operations with Coolkey (#1766712)
|
||||||
|
|
||||||
* Thu Apr 18 2019 Jakub Jelen <jjelen@redhat.com> - 0.19.0-5
|
* Thu Apr 18 2019 Jakub Jelen <jjelen@redhat.com> - 0.19.0-5
|
||||||
- Avoid multilib issues (#1693380)
|
- Avoid multilib issues (#1693380)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user