sign-ed25519: More verbose errors for invalid length
authorColin Walters <walters@verbum.org>
Mon, 17 Jul 2023 22:03:54 +0000 (18:03 -0400)
committerColin Walters <walters@verbum.org>
Tue, 18 Jul 2023 11:55:14 +0000 (07:55 -0400)
commitfb40e559903491bf1ff106a4fdb63b815280550a
treedb010326c73e28f77c75c05822fd6eea92ac8bd5
parent1a2fac371b3535f612b083fca1bf99b86a7c5306
sign-ed25519: More verbose errors for invalid length

Add a helper to compare lengths which includes the found
and expected values.  Use it consistently.

The error message "Incorrect" is misleading; one might think
one had the *wrong* key.  "Ill-formed" makes it clearer that
we're not parsing it at all.
src/libostree/ostree-sign-ed25519.c