Message ID | 38BA5B1F-8D89-4490-91BC-97F6D269872F@lab126.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | lib: rsa: rsa-sign: Minor bug in debug message | expand |
On Mon, 19 Jul 2021 at 10:18, Chan, Donald <hoiho@lab126.com> wrote: > > *sig_size isn't set until later so use the correct variables. > > Signed-off-by: Donald Chan <hoiho@lab126.com> > --- > lib/rsa/rsa-sign.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Simon Glass <sjg@chromium.org>
On Mon, Jul 19, 2021 at 09:18:54AM -0700, Chan, Donald wrote: > *sig_size isn't set until later so use the correct variables. > > Signed-off-by: Donald Chan <hoiho@lab126.com> > Reviewed-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
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 isn't set until later so use the correct variables. Signed-off-by: Donald Chan <hoiho@lab126.com> --- lib/rsa/rsa-sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) *sig_size = size;