aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-17 18:18:19 +0000
committerlloyd <[email protected]>2008-11-17 18:18:19 +0000
commitd835338c5356b806fa5f4e1b4ee7a7d6f016a0de (patch)
tree12b50533bde4c9b614fda79a6a608a22ae19e6ed
parent33e15eb51ce0a2cd5c4b1dc0b36d1bb90b3a4d81 (diff)
Reorganize all GF(p)/ECC tests to be called from pk.cpp
-rw-r--r--checks/check.cpp2
-rw-r--r--checks/ec_tests.cpp2
-rw-r--r--checks/pk.cpp2
-rw-r--r--checks/validate.h18
4 files changed, 13 insertions, 11 deletions
diff --git a/checks/check.cpp b/checks/check.cpp
index 619e8a3a7..444a7986e 100644
--- a/checks/check.cpp
+++ b/checks/check.cpp
@@ -206,8 +206,6 @@ int run_test_suite(RandomNumberGenerator& rng)
errors += do_validation_tests(VALIDATION_FILE, rng);
errors += do_validation_tests(EXPECTED_FAIL_FILE, rng, false);
errors += do_bigint_tests(BIGINT_VALIDATION_FILE, rng);
- errors += do_gfpmath_tests(rng);
- do_ec_tests(rng);
errors += do_pk_validation_tests(PK_VALIDATION_FILE, rng);
//errors += do_cvc_tests(rng);
}
diff --git a/checks/ec_tests.cpp b/checks/ec_tests.cpp
index 03a527ad7..043454b51 100644
--- a/checks/ec_tests.cpp
+++ b/checks/ec_tests.cpp
@@ -1169,7 +1169,7 @@ void test_ec_key_cast(RandomNumberGenerator& rng)
void do_ec_tests(RandomNumberGenerator& rng)
{
- std::cout << "InSiTo ECC tests: " << std::flush;
+ std::cout << "Testing ECC: " << std::flush;
test_point_turn_on_sp_red_mul_simple();
test_point_turn_on_sp_red_mul();
diff --git a/checks/pk.cpp b/checks/pk.cpp
index a353f7ca7..c02005245 100644
--- a/checks/pk.cpp
+++ b/checks/pk.cpp
@@ -763,6 +763,8 @@ u32bit do_pk_validation_tests(const std::string& filename,
std::cout << std::endl;
+ errors += do_gfpmath_tests(rng);
+ do_ec_tests(rng);
errors += do_ecdsa_tests(rng);
errors += do_eckaeg_tests(rng);
do_pk_keygen_tests(rng);
diff --git a/checks/validate.h b/checks/validate.h
index 38f839ac4..f7cc4bdf9 100644
--- a/checks/validate.h
+++ b/checks/validate.h
@@ -6,27 +6,29 @@
#include <botan/rng.h>
#include <string>
+using Botan::RandomNumberGenerator;
+
using Botan::u32bit;
u32bit do_validation_tests(const std::string&,
- Botan::RandomNumberGenerator& rng,
+ RandomNumberGenerator& rng,
bool = true);
u32bit do_bigint_tests(const std::string&,
- Botan::RandomNumberGenerator& rng);
+ RandomNumberGenerator& rng);
-u32bit do_gfpmath_tests(Botan::RandomNumberGenerator& rng);
+u32bit do_gfpmath_tests(RandomNumberGenerator& rng);
u32bit do_pk_validation_tests(const std::string&,
- Botan::RandomNumberGenerator&);
+ RandomNumberGenerator&);
void do_ec_tests(RandomNumberGenerator& rng);
-u32bit do_ecdsa_tests(Botan::RandomNumberGenerator& rng);
-u32bit do_eckaeg_tests(Botan::RandomNumberGenerator& rng);
-u32bit do_cvc_tests(Botan::RandomNumberGenerator& rng);
+u32bit do_ecdsa_tests(RandomNumberGenerator& rng);
+u32bit do_eckaeg_tests(RandomNumberGenerator& rng);
+u32bit do_cvc_tests(RandomNumberGenerator& rng);
-void do_x509_tests(Botan::RandomNumberGenerator&);
+void do_x509_tests(RandomNumberGenerator&);
#endif