]> the.earth.li Git - onak.git/blobdiff - sigcheck.c
Fix missing break in ECDSA/SHA1 sigcheck
[onak.git] / sigcheck.c
index ff806046b3d9866b657bb8afc3fd39cb6e54ee36..31932bc02f63d7c78d0bfe57bb7f220640977a01 100644 (file)
 #include <nettle/rsa.h>
 #include "rsa.h"
 
-#ifndef nettle_get_secp_256r1
+#ifndef HAVE_NETTLE_GET_SECP_256R1
 #define nettle_get_secp_256r1() &nettle_secp_256r1
 #endif
-#ifndef nettle_get_secp_384r1
+#ifndef HAVE_NETTLE_GET_SECP_384R1
 #define nettle_get_secp_384r1() &nettle_secp_384r1
 #endif
-#ifndef nettle_get_secp_521r1
+#ifndef HAVE_NETTLE_GET_SECP_521R1
 #define nettle_get_secp_521r1() &nettle_secp_521r1
 #endif
 
@@ -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) ?