Skip to contentSkip to conversation

commands: digest: don't be to restrictive with the length of verification files

PATCH Applied Hubert Feurstein 2 participants 2 messages Dec 10, 2019 – Dec 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commands: digest: don't be to restrictive with the length of verification files

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

---
 commands/digest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
commands/digest.c +1 -1
index 99b27dcc2..21a091717 100644
@@ -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);
 
Signature · 7 lines
2.24.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · 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.

---
 commands/digest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox