]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: mkimage: set OPENSSL_API_COMPAT
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 6 May 2022 11:28:52 +0000 (13:28 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 7 May 2022 21:17:25 +0000 (23:17 +0200)
Building with OpenSSL 3.0 produces warnings like:

../tools/sunxi_toc0.c:846:17: warning: ‘RSA_get0_d’ is deprecated:
Since OpenSSL 3.0 [-Wdeprecated-declarations]
  846 |                 if (root_key && RSA_get0_d(root_key)) {
      |                 ^~

As OpenSSL 3.0 is not available in elder Linux distributions
just silence the warning.

Add missing #include <openssl/bn.h>.

Fixes: e9e87ec47c75 ("tools: mkimage: Add Allwinner TOC0 support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
tools/sunxi_toc0.c

index 58a6e7a0a10bd185f7c5de645b056a87787f133b..bab5d17b7de19e877074ed828e626b2a08468858 100644 (file)
@@ -4,6 +4,8 @@
  * (C) Copyright 2020-2021 Samuel Holland <samuel@sholland.org>
  */
 
+#define OPENSSL_API_COMPAT 0x10101000L
+
 #include <assert.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -11,6 +13,7 @@
 #include <string.h>
 
 #include <openssl/asn1t.h>
+#include <openssl/bn.h>
 #include <openssl/pem.h>
 #include <openssl/rsa.h>