summaryrefslogtreecommitdiff
blob: 342abd83eb018757e5f4caad937caa2f8a56b326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 1f1de5ae9a43e845431dc43af96ec61e910ad789 Mon Sep 17 00:00:00 2001
From: Alon Bar-Lev <alon.barlev@gmail.com>
Date: Wed, 16 May 2018 21:30:15 +0300
Subject: [PATCH] build: fix --disable-sm

---
 src/libopensc/card-sc-hsm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libopensc/card-sc-hsm.c b/src/libopensc/card-sc-hsm.c
index e2af52b9..a609f612 100644
--- a/src/libopensc/card-sc-hsm.c
+++ b/src/libopensc/card-sc-hsm.c
@@ -451,6 +451,7 @@ static int sc_hsm_soc_biomatch(sc_card_t *card, struct sc_pin_cmd_data *data,
 
 
 
+#ifdef ENABLE_SM
 #ifdef ENABLE_OPENPACE
 #include "sm/sm-eac.h"
 #include <eac/cv_cert.h>
@@ -573,6 +574,7 @@ static int sc_hsm_perform_chip_authentication(sc_card_t *card)
 	return SC_ERROR_NOT_SUPPORTED;
 }
 #endif
+#endif
 
 
 
-- 
2.16.1

From a6b4605b863d45978ebd681c4bbaa3aaf0ab90e7 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Tue, 10 Jul 2018 14:49:42 +0200
Subject: [PATCH] card-piv.c: initialize variable to fix a ppc64el build
 failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This fixes a build failure with optimized ppc64el and new gcc builds
card-piv.c: In function ‘piv_validate_general_authentication.isra.3’:
card-piv.c:2390:9: error: ‘rbuflen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    body = sc_asn1_find_tag(card->ctx, rbuf, rbuflen, 0x7c, &bodylen);
    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 src/libopensc/card-piv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libopensc/card-piv.c b/src/libopensc/card-piv.c
index e85dfc45..13b0cc21 100644
--- a/src/libopensc/card-piv.c
+++ b/src/libopensc/card-piv.c
@@ -2334,7 +2334,7 @@ static int piv_validate_general_authentication(sc_card_t *card,
 
 	u8 sbuf[4096]; /* needs work. for 3072 keys, needs 384+10 or so */
 	u8 *rbuf = NULL;
-	size_t rbuflen;
+	size_t rbuflen = 0;
 
 	SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
 
-- 
2.16.4