diff options
author | Tom Rini <trini@konsulko.com> | 2024-03-07 11:56:35 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-07 11:56:35 -0500 |
commit | beedf675b36841ce1e077779157a87a6505317e6 (patch) | |
tree | 502696b12f908d1436d3248ee7bc07fd313c73fc /lib/ecdsa/ecdsa-verify.c | |
parent | 6eb682bc7ea398fad4aadb612c690884e73edc03 (diff) | |
parent | 6ec3f9208948b4f3aa4b6d8362c0daaffaea0a0f (diff) |
Merge branch '2024-03-07-assorted-fixes' into next
- Add phytec am64x platform, update am65-cpsw and a few other assorted
fixes.
Diffstat (limited to 'lib/ecdsa/ecdsa-verify.c')
-rw-r--r-- | lib/ecdsa/ecdsa-verify.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ecdsa/ecdsa-verify.c b/lib/ecdsa/ecdsa-verify.c index 0601700c4fc..4d1835b598a 100644 --- a/lib/ecdsa/ecdsa-verify.c +++ b/lib/ecdsa/ecdsa-verify.c @@ -31,6 +31,11 @@ static int fdt_get_key(struct ecdsa_public_key *key, const void *fdt, int node) int x_len, y_len; key->curve_name = fdt_getprop(fdt, node, "ecdsa,curve", NULL); + if (!key->curve_name) { + debug("Error: ecdsa cannot get 'ecdsa,curve' property from key. Likely not an ecdsa key.\n"); + return -ENOMSG; + } + key->size_bits = ecdsa_key_size(key->curve_name); if (key->size_bits == 0) { debug("Unknown ECDSA curve '%s'", key->curve_name); |