1 From aed6107ae96870cd190b23d6da34a7e616799ed3 Mon Sep 17 00:00:00 2001
2 From: Michal Vasilek <michal.vasilek@nic.cz>
3 Date: Fri, 22 Jul 2022 19:55:53 +0200
4 Subject: [PATCH 1/2] tools: mkimage: fix build with LibreSSL
6 RSA_get0_* functions are not available in LibreSSL
8 Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
9 Reviewed-by: Simon Glass <sjg@chromium.org>
11 tools/sunxi_toc0.c | 6 ++++++
12 1 file changed, 6 insertions(+)
14 --- a/tools/sunxi_toc0.c
15 +++ b/tools/sunxi_toc0.c
17 #define pr_warn(fmt, args...) fprintf(stderr, pr_fmt(fmt), "warning", ##args)
18 #define pr_info(fmt, args...) fprintf(stderr, pr_fmt(fmt), "info", ##args)
20 +#if defined(LIBRESSL_VERSION_NUMBER)
21 +#define RSA_get0_n(key) (key)->n
22 +#define RSA_get0_e(key) (key)->e
23 +#define RSA_get0_d(key) (key)->d
26 struct __packed toc0_key_item {