diff options
author | René Korthaus <[email protected]> | 2017-02-12 13:54:21 +0100 |
---|---|---|
committer | René Korthaus <[email protected]> | 2017-02-12 13:54:21 +0100 |
commit | 96033661c46807b94b35419a8520d43445cabee2 (patch) | |
tree | 9f2443d0fab35fc9e6c088ee00754f0d5c398664 /src/tests/test_ecdsa.cpp | |
parent | d7990d845e7f7ab98b61de9b651a9afe96d6d873 (diff) |
Add ECDSA key tests from Google's project Wycheproof
Diffstat (limited to 'src/tests/test_ecdsa.cpp')
-rw-r--r-- | src/tests/test_ecdsa.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tests/test_ecdsa.cpp b/src/tests/test_ecdsa.cpp index 41d81a576..148abaacc 100644 --- a/src/tests/test_ecdsa.cpp +++ b/src/tests/test_ecdsa.cpp @@ -89,17 +89,17 @@ class ECDSA_Invalid_Key_Tests : public Text_Based_Test std::unique_ptr<Botan::PointGFp> public_point; try - { - public_point.reset(new Botan::PointGFp(group.get_curve(), x, y)); - } + { + public_point.reset(new Botan::PointGFp(group.get_curve(), x, y)); + } catch(Botan::Invalid_Argument&) - { - // PointGFp() performs a range check on x, y in [0, p−1], - // which is also part of the EC public key checks, e.g., - // in NIST SP800-56A rev2, sec. 5.6.2.3.2 - result.test_success("public key fails check"); - return result; - } + { + // PointGFp() performs a range check on x, y in [0, p−1], + // which is also part of the EC public key checks, e.g., + // in NIST SP800-56A rev2, sec. 5.6.2.3.2 + result.test_success("public key fails check"); + return result; + } std::unique_ptr<Botan::Public_Key> key(new Botan::ECDSA_PublicKey(group, *public_point)); result.test_eq("public key fails check", key->check_key(Test::rng(), false), false); |