Unbreak build with LTO enabled

This commit is contained in:
Jakub Jelen 2020-05-13 18:24:31 +02:00
parent 95b20a6ac7
commit 5af05e05ce
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From 8551e84d74af24638581a473775b71e6aad10dcf Mon Sep 17 00:00:00 2001
From: Frank Morgner <frankmorgner@gmail.com>
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) {

View File

@ -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