diff --git a/opensc-0.20.0-lto-build.patch b/opensc-0.20.0-lto-build.patch new file mode 100644 index 0000000..5028307 --- /dev/null +++ b/opensc-0.20.0-lto-build.patch @@ -0,0 +1,24 @@ +From 8551e84d74af24638581a473775b71e6aad10dcf Mon Sep 17 00:00:00 2001 +From: Frank Morgner +Date: Wed, 4 Mar 2020 23:09:57 +0100 +Subject: [PATCH] fixed https://github.com/OpenSC/OpenSC/issues/1948 + +closes https://github.com/OpenSC/OpenSC/pull/1958 +--- + src/tests/p11test/p11test_case_pss_oaep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tests/p11test/p11test_case_pss_oaep.c b/src/tests/p11test/p11test_case_pss_oaep.c +index 0194711924..b114b73658 100644 +--- a/src/tests/p11test/p11test_case_pss_oaep.c ++++ b/src/tests/p11test/p11test_case_pss_oaep.c +@@ -376,7 +376,7 @@ int oaep_encrypt_decrypt_test(test_cert_t *o, token_info_t *info, test_mech_t *m + CK_BYTE *dec_message = NULL; + int dec_message_length = 0; + int message_length = 16; +- unsigned char *enc_message; ++ unsigned char *enc_message = NULL; + int enc_message_length, rv; + + if (o->private_handle == CK_INVALID_HANDLE) { + diff --git a/opensc.spec b/opensc.spec index e9baf20..6da3f3d 100644 --- a/opensc.spec +++ b/opensc.spec @@ -17,6 +17,8 @@ Patch1: opensc-0.19.0-pinpad.patch Patch2: opensc-0.20.0-no-common.patch # https://github.com/OpenSC/OpenSC/pull/1987 Patch3: opensc-0.20.0-cardos.patch +# https://github.com/OpenSC/OpenSC/commit/8551e84d +Patch4: opensc-0.20.0-lto-build.patch BuildRequires: pcsc-lite-devel BuildRequires: readline-devel @@ -53,6 +55,7 @@ every software/card that does so, too. %patch1 -p1 -b .pinpad %patch2 -p1 -b .no-common %patch3 -p1 -b .cardos +%patch4 -p1 -b .lto-build cp %{SOURCE2} tests/ # The test-pkcs11-tool-allowed-mechanisms already works in Fedora