From 8e4c1600cae6c6d71ec0c8843d11354842a4feba Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Sat, 2 Jan 2021 11:04:33 +0000 Subject: [PATCH] Fix missing break in ECDSA/SHA1 sigcheck We were mistakenly falling through to the ECDSA/SHA256 check. --- sigcheck.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sigcheck.c b/sigcheck.c index 9a29dfc..31932bc 100644 --- a/sigcheck.c +++ b/sigcheck.c @@ -409,6 +409,7 @@ onak_status_t onak_check_hash_sig(struct openpgp_publickey *sigkey, ret = ecdsa_verify(&pubkey.ecc, SHA1_DIGEST_SIZE, hash, &dsasig) ? ONAK_E_OK : ONAK_E_BAD_SIGNATURE; + break; case KEYHASH(OPENPGP_PKALGO_ECDSA, OPENPGP_HASH_SHA256): ret = ecdsa_verify(&pubkey.ecc, SHA256_DIGEST_SIZE, hash, &dsasig) ? -- 2.39.5