summaryrefslogtreecommitdiffstats
path: root/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch
blob: e3fe28c75b5b1f56c3549d6667bffa6029d1d02f (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
From: Markus Pargmann <mpa@pengutronix.de>
Date: Thu, 17 Apr 2014 14:40:49 +0200
Subject: [PATCH] key2pub: Fix ssl-keys.c generation

This patch fixes the generated ssl-keys.c file. Without these fixes,
crda does not compile with ssl.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 utils/key2pub.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/key2pub.py b/utils/key2pub.py
index 3e84cd2a934d..7de45f7b9603 100755
--- a/utils/key2pub.py
+++ b/utils/key2pub.py
@@ -59,7 +59,7 @@ def print_ssl_32(output, name, val):
 
 def print_ssl(output, name, val):
     import struct
-    output.write('#include <stdint.h>\n')
+    output.write('#include <stdint.h>\n#include <openssl/bn.h>\n')
     if len(struct.pack('@L', 0)) == 8:
         return print_ssl_64(output, name, val)
     else:
@@ -78,7 +78,7 @@ struct pubkey {
 
 #define KEYS(e,n)	{ KEY(e), KEY(n), }
 
-static struct pubkey keys[] = {
+__attribute__((unused)) static struct pubkey keys[] = {
 ''')
     for n in xrange(n + 1):
         output.write('	KEYS(e_%d, n_%d),\n' % (n, n))