[PATCH v2 1/1] tools: mkimage: set OPENSSL_API_COMPAT

Andre Przywara andre.przywara at arm.com
Fri May 6 17:17:41 CEST 2022


On Fri,  6 May 2022 13:28:52 +0200
Heinrich Schuchardt <heinrich.schuchardt at canonical.com> wrote:

Hi,

> 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 at canonical.com>

Tested on Ubuntu 18.04, 20.04 and 22.04. The first two worked fine with
or without the patch, but indeed 22.04 complained loudly, which this patch
fixes.

Tested-by: Andre Przywara <andre.przywara at arm.com>

Cheers,
Andre

> ---
> v2:
> 	add missing include
> 
> Gitlab showed no issues:
> https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/11940
> ---
>  tools/sunxi_toc0.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/sunxi_toc0.c b/tools/sunxi_toc0.c
> index 58a6e7a0a1..bab5d17b7d 100644
> --- a/tools/sunxi_toc0.c
> +++ b/tools/sunxi_toc0.c
> @@ -4,6 +4,8 @@
>   * (C) Copyright 2020-2021 Samuel Holland <samuel at 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>
>  



More information about the U-Boot mailing list