diff --git a/opensc-0.15.0-eID-rsa2048.patch b/opensc-0.15.0-eID-rsa2048.patch new file mode 100644 index 0000000..b3f6cce --- /dev/null +++ b/opensc-0.15.0-eID-rsa2048.patch @@ -0,0 +1,24 @@ +From 74493ca73f8e3c21c098fecb42a7a08ead85e197 Mon Sep 17 00:00:00 2001 +From: Henrik Andersson +Date: Fri, 13 May 2016 09:16:21 +0200 +Subject: [PATCH] Add support for RSA with keylength 2048 + +This solves sign issues with swedish eID cards which have +RSA keys with length 2048. This also solves the issue #726. +--- + src/libopensc/card-setcos.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/libopensc/card-setcos.c b/src/libopensc/card-setcos.c +index 2b0182a..a852180 100644 +--- a/src/libopensc/card-setcos.c ++++ b/src/libopensc/card-setcos.c +@@ -215,6 +215,7 @@ static int setcos_init(sc_card_t *card) + _sc_card_add_rsa_alg(card, 512, flags, 0); + _sc_card_add_rsa_alg(card, 768, flags, 0); + _sc_card_add_rsa_alg(card, 1024, flags, 0); ++ _sc_card_add_rsa_alg(card, 2048, flags, 0); + } + break; + } + diff --git a/opensc.spec b/opensc.spec index 72a2772..111f340 100644 --- a/opensc.spec +++ b/opensc.spec @@ -23,6 +23,7 @@ Obsoletes: opensc-devel < 0.12.0 Patch0: opensc-0.15.0-fork-issue.patch Patch1: opensc-export-symbols.patch Patch2: opensc-0.15.0-pubkey-crash.patch +Patch3: opensc-0.15.0-eID-rsa2048.patch %description OpenSC provides a set of libraries and utilities to work with smart cards. Its @@ -40,6 +41,7 @@ every software/card that does so, too. %patch0 -p1 -b .fork-issue %patch1 -p1 -b .export-symbols %patch2 -p1 -b .pubkey-crash +%patch3 -p1 -b .eID-rsa2048 cp -p src/pkcs15init/README ./README.pkcs15init cp -p src/scconf/README.scconf .