From: Jonathan McDowell Date: Sat, 2 Jan 2021 11:04:33 +0000 (+0000) Subject: Fix missing break in ECDSA/SHA1 sigcheck X-Git-Tag: onak-0.6.2~11 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=8e4c1600cae6c6d71ec0c8843d11354842a4feba;p=onak.git Fix missing break in ECDSA/SHA1 sigcheck We were mistakenly falling through to the ECDSA/SHA256 check. --- 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) ?