mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: digest: don't be to restrictive with the length of verification files
@ 2019-12-10 17:36 Hubert Feurstein
  2019-12-11  8:41 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Hubert Feurstein @ 2019-12-10 17:36 UTC (permalink / raw)
  To: barebox; +Cc: Hubert Feurstein

Otherwise it is not possible to verify against a file created by shaXsum
from linux. Usually there is the filename appended after the hash.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 commands/digest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/digest.c b/commands/digest.c
index 99b27dcc2..21a091717 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -164,7 +164,7 @@ static int do_digest(int argc, char *argv[])
 
 	if (sig) {
 		digestlen = digest_length(d);
-		if (siglen == 2 * digestlen) {
+		if (siglen >= 2 * digestlen) {
 			if (!tmp_sig)
 				tmp_sig = xmalloc(digestlen);
 
-- 
2.24.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-11  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 17:36 [PATCH] commands: digest: don't be to restrictive with the length of verification files Hubert Feurstein
2019-12-11  8:41 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox