Skip to content

Commit

Permalink
tools: mkimage: set OPENSSL_API_COMPAT
Browse files Browse the repository at this point in the history
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: e9e87ec ("tools: mkimage: Add Allwinner TOC0 support")
Signed-off-by: Heinrich Schuchardt <[email protected]>
Tested-by: Andre Przywara <[email protected]>
  • Loading branch information
xypron committed May 7, 2022
1 parent deb2638 commit e927e21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/sunxi_toc0.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
* (C) Copyright 2020-2021 Samuel Holland <[email protected]>
*/

#define OPENSSL_API_COMPAT 0x10101000L

#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <openssl/asn1t.h>
#include <openssl/bn.h>
#include <openssl/pem.h>
#include <openssl/rsa.h>

Expand Down

0 comments on commit e927e21

Please sign in to comment.