]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
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 a5abbabbea987552d015924ce280ba8c39387079..f31cbcfb61820ee4d235a9041df4076339bd878a 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;
                }