unit-tests: Fix skipping of some ECDSA signature schemes
authorSophieK <35367649+suishixingkong@users.noreply.github.com>
Mon, 29 Apr 2019 06:33:47 +0000 (14:33 +0800)
committerTobias Brunner <tobias@strongswan.org>
Mon, 29 Apr 2019 07:56:49 +0000 (09:56 +0200)
Closes strongswan/strongswan#137.

src/libstrongswan/tests/suites/test_ecdsa.c

index a5abbab..f31cbcf 100644 (file)
@@ -53,7 +53,7 @@ static void test_good_sig(private_key_t *privkey, public_key_t *pubkey)
                        continue;
                }
                if (schemes[i].key_size != 0 &&
-                       schemes[i].scheme != privkey->get_keysize(privkey))
+                       schemes[i].key_size != privkey->get_keysize(privkey))
                {
                        continue;
                }
@@ -109,7 +109,7 @@ static void test_bad_sigs(public_key_t *pubkey)
        for (s = 0; s < countof(schemes); s++)
        {
                if (schemes[s].key_size != 0 &&
-                       schemes[s].scheme != pubkey->get_keysize(pubkey))
+                       schemes[s].key_size != pubkey->get_keysize(pubkey))
                {
                        continue;
                }