summaryrefslogtreecommitdiffstats
path: root/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch')
-rw-r--r--patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch b/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch
new file mode 100644
index 000000000..e3fe28c75
--- /dev/null
+++ b/patches/crda-3.18/0001-key2pub-Fix-ssl-keys.c-generation.patch
@@ -0,0 +1,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))