* [PATCH 1/1] tools: mkimage: set OPENSSL_API_COMPAT
@ 2022-04-30 13:45 Heinrich Schuchardt
2022-05-05 19:18 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2022-04-30 13:45 UTC (permalink / raw)
To: Jagan Teki, Andre Przywara; +Cc: Samuel Holland, u-boot, Heinrich Schuchardt
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.
Fixes: e9e87ec47c75 ("tools: mkimage: Add Allwinner TOC0 support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
tools/sunxi_toc0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/sunxi_toc0.c b/tools/sunxi_toc0.c
index 58a6e7a0a1..0e658c5506 100644
--- a/tools/sunxi_toc0.c
+++ b/tools/sunxi_toc0.c
@@ -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>
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] tools: mkimage: set OPENSSL_API_COMPAT
2022-04-30 13:45 [PATCH 1/1] tools: mkimage: set OPENSSL_API_COMPAT Heinrich Schuchardt
@ 2022-05-05 19:18 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2022-05-05 19:18 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Jagan Teki, Andre Przywara, Samuel Holland, u-boot
[-- Attachment #1: Type: text/plain, Size: 3321 bytes --]
On Sat, Apr 30, 2022 at 03:45:24PM +0200, Heinrich Schuchardt wrote:
> 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.
>
> Fixes: e9e87ec47c75 ("tools: mkimage: Add Allwinner TOC0 support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
On Ubuntu 20.04 which has OpenSSL 1.1.1f this adds:
tools/sunxi_toc0.c: In function ‘toc0_create_key_item’:
tools/sunxi_toc0.c:209:10: warning: implicit declaration of function ‘BN_bn2bin’ [-Wimplicit-function-declaration]
209 | n_len = BN_bn2bin(RSA_get0_n(root_key), key_item->key0);
| ^~~~~~~~~
tools/sunxi_toc0.c: In function ‘toc0_verify_key_item’:
tools/sunxi_toc0.c:274:6: warning: implicit declaration of function ‘BN_bin2bn’ [-Wimplicit-function-declaration]
274 | n = BN_bin2bn(key_item->key0, n_len, NULL);
| ^~~~~~~~~
tools/sunxi_toc0.c:274:4: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
274 | n = BN_bin2bn(key_item->key0, n_len, NULL);
| ^
tools/sunxi_toc0.c:275:4: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
275 | e = BN_bin2bn(key_item->key0 + n_len, e_len, NULL);
| ^
tools/sunxi_toc0.c:283:19: warning: implicit declaration of function ‘BN_cmp’; did you mean ‘OBJ_cmp’? [-Wimplicit-function-declaration]
283 | if (root_key && (BN_cmp(n, RSA_get0_n(root_key)) ||
| ^~~~~~
| OBJ_cmp
tools/sunxi_toc0.c:305:5: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
305 | n = BN_bin2bn(key_item->key1, n_len, NULL);
| ^
tools/sunxi_toc0.c:306:5: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
306 | e = BN_bin2bn(key_item->key1 + n_len, e_len, NULL);
| ^
tools/sunxi_toc0.c: In function ‘toc0_create_cert_item’:
tools/sunxi_toc0.c:363:6: warning: implicit declaration of function ‘BN_bn2binpad’ [-Wimplicit-function-declaration]
363 | if (BN_bn2binpad(RSA_get0_n(fw_key), publicKey->n, sizeof(publicKey->n)) < 0 ||
| ^~~~~~~~~~~~
tools/sunxi_toc0.c: In function ‘toc0_verify_cert_item’:
tools/sunxi_toc0.c:423:4: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
423 | n = BN_bin2bn(publicKey->n, sizeof(publicKey->n), NULL);
| ^
tools/sunxi_toc0.c:424:4: warning: assignment to ‘BIGNUM *’ {aka ‘struct bignum_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
424 | e = BN_bin2bn(publicKey->e, sizeof(publicKey->e), NULL);
| ^
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-05 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 13:45 [PATCH 1/1] tools: mkimage: set OPENSSL_API_COMPAT Heinrich Schuchardt
2022-05-05 19:18 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.