* [PATCH] crypto: asymmetric_keys: Fix PKCS#7 selftest error reporting
@ 2026-10-17 21:05 m-amirpour
0 siblings, 0 replies; only message in thread
From: m-amirpour @ 2026-10-17 21:05 UTC (permalink / raw)
To: keyrings
Cc: dhowells, lukas, ignat, herbert, davem, linux-crypto,
linux-kernel, Muhammad Mahdi Amirpour
From: Muhammad Mahdi Amirpour <ampr.mhd@gmail.com>
pkcs7_parse_message() returns an error pointer on failure, but the
selftest prints ret, which still contains the result of the previous
x509_load_certificate_list() call.
Print the parser's error pointer with %pe so that a failure reports
the actual parsing error.
Signed-off-by: Muhammad Mahdi Amirpour <ampr.mhd@gmail.com>
---
crypto/asymmetric_keys/selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/asymmetric_keys/selftest.c b/crypto/asymmetric_keys/selftest.c
index 98dc5cdfdeb..42857b02258 100644
--- a/crypto/asymmetric_keys/selftest.c
+++ b/crypto/asymmetric_keys/selftest.c
@@ -41,7 +41,7 @@ void fips_signature_selftest(const char *name,
pkcs7 = pkcs7_parse_message(sig, sig_len);
if (IS_ERR(pkcs7))
- panic("Certs %s selftest: pkcs7_parse_message() = %d\n", name, ret);
+ panic("Certs %s selftest: pkcs7_parse_message() = %pe\n", name, pkcs7);
pkcs7_supply_detached_data(pkcs7, data, data_len);
--
2.55.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-17 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-17 21:05 [PATCH] crypto: asymmetric_keys: Fix PKCS#7 selftest error reporting m-amirpour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®