[PATCH] lib: rsa: rsa-sign: Minor bug in debug message

Chan, Donald hoiho at lab126.com
Mon Jul 19 18:18:54 CEST 2021


*sig_size isn't set until later so use the correct variables.

Signed-off-by: Donald Chan <hoiho at lab126.com>
---
  lib/rsa/rsa-sign.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index f70f352311..5b85d61a13 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -482,7 +482,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct 
padding_algo *padding_algo,
  	#endif
  	EVP_MD_CTX_destroy(context);

-	debug("Got signature: %d bytes, expected %zu\n", *sig_size, size);
+	debug("Got signature: %zu bytes, expected %d\n", size, 
EVP_PKEY_size(pkey));
  	*sigp = sig;
  	*sig_size = size;

-- 
2.16.6


More information about the U-Boot mailing list