Skip to content

Commit

Permalink
bootutil: Fix signature length passed to ED25519_verify
Browse files Browse the repository at this point in the history
The signature length passed to ED25519_verify, from
bootutil_verify_sig, has been accidentally hardcoded, which prevented
vertification of signatures different than 32 byte in length.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
  • Loading branch information
de-nordic committed Jun 7, 2024
1 parent 92ad926 commit 7d40a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boot/bootutil/src/image_ed25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bootutil_verify_sig(uint8_t *hash, uint32_t hlen, uint8_t *sig, size_t slen,
goto out;
}

rc = ED25519_verify(hash, 32, sig, pubkey);
rc = ED25519_verify(hash, slen, sig, pubkey);

if (rc == 0) {
/* if verify returns 0, there was an error. */
Expand Down

0 comments on commit 7d40a37

Please sign in to comment.