Skip to contentSkip to conversation

tools: mkimage: fix build with recent LibreSSL

PATCH In review Mark Kettenis 3 participants 3 messages Aug 29, 2022 – Aug 31, 2022 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools: mkimage: fix build with recent LibreSSL

LibreSSL 3.5.0 and later (also shipped as part of OpenBSD 7.1 and and later) have an opaque RSA object and do provide the RSA_get0_* functions that OpenSSL provides.

Fixes 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL")

---

ChangeLog:

v2: - Tweak version check and commit message to reflect that
LibreSSL 3.5.0 and later have the RSA_get0_* functions

 tools/sunxi_toc0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/sunxi_toc0.c +1 -1
index 56200bd927..7a8d74bb8e 100644
@@ -34,7 +34,7 @@
 #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)
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
 #define RSA_get0_n(key) (key)->n
 #define RSA_get0_e(key) (key)->e
 #define RSA_get0_d(key) (key)->d
Signature · 1 line
2.37.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Mark Kettenis

LibreSSL 3.5.0 and later (also shipped as part of OpenBSD 7.1 and and later) have an opaque RSA object and do provide the RSA_get0_* functions that OpenSSL provides.

Fixes 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL")
Quoted 28 lines

---

ChangeLog:

v2: - Tweak version check and commit message to reflect that
LibreSSL 3.5.0 and later have the RSA_get0_* functions

 tools/sunxi_toc0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/sunxi_toc0.c +1 -1
index 56200bd927..7a8d74bb8e 100644
@@ -34,7 +34,7 @@
 #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)
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
 #define RSA_get0_n(key) (key)->n
 #define RSA_get0_e(key) (key)->e
 #define RSA_get0_d(key) (key)->d
Signature · 1 line
2.37.2