]> the.earth.li Git - onak.git/commitdiff
Fix missing break in ECDSA/SHA1 sigcheck
authorJonathan McDowell <noodles@earth.li>
Sat, 2 Jan 2021 11:04:33 +0000 (11:04 +0000)
committerJonathan McDowell <noodles@earth.li>
Sat, 2 Jan 2021 11:04:33 +0000 (11:04 +0000)
We were mistakenly falling through to the ECDSA/SHA256 check.

sigcheck.c

index 9a29dfc4b5451b439b82f0c56e9e08437b458b26..31932bc02f63d7c78d0bfe57bb7f220640977a01 100644 (file)
@@ -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) ?