mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
29 lines
887 B
Diff
29 lines
887 B
Diff
|
From aed6107ae96870cd190b23d6da34a7e616799ed3 Mon Sep 17 00:00:00 2001
|
||
|
From: Michal Vasilek <michal.vasilek@nic.cz>
|
||
|
Date: Fri, 22 Jul 2022 19:55:53 +0200
|
||
|
Subject: [PATCH 1/2] tools: mkimage: fix build with LibreSSL
|
||
|
|
||
|
RSA_get0_* functions are not available in LibreSSL
|
||
|
|
||
|
Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
|
||
|
Reviewed-by: Simon Glass <sjg@chromium.org>
|
||
|
---
|
||
|
tools/sunxi_toc0.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
--- a/tools/sunxi_toc0.c
|
||
|
+++ b/tools/sunxi_toc0.c
|
||
|
@@ -34,6 +34,12 @@
|
||
|
#define pr_warn(fmt, args...) fprintf(stderr, pr_fmt(fmt), "warning", ##args)
|
||
|
#define pr_info(fmt, args...) fprintf(stderr, pr_fmt(fmt), "info", ##args)
|
||
|
|
||
|
+#if defined(LIBRESSL_VERSION_NUMBER)
|
||
|
+#define RSA_get0_n(key) (key)->n
|
||
|
+#define RSA_get0_e(key) (key)->e
|
||
|
+#define RSA_get0_d(key) (key)->d
|
||
|
+#endif
|
||
|
+
|
||
|
struct __packed toc0_key_item {
|
||
|
__le32 vendor_id;
|
||
|
__le32 key0_n_len;
|