From 7743c8e97a377ab3a24d590182d848b65d24dff2 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 26 Apr 2019 21:40:15 -0400 Subject: Fix feature macro checks. Add a checker script. --- src/cli/speed.cpp | 2 -- src/cli/timing_tests.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/cli') diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 84d8d5679..2f4563bb3 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -1425,7 +1425,6 @@ class Speed final : public Command { Botan::secure_vector ws; -#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32) std::unique_ptr p192_timer = make_timer("P-192 redc"); Botan::BigInt r192(rng(), 192*2 - 1); while(p192_timer->under(runtime)) @@ -1465,7 +1464,6 @@ class Speed final : public Command r384 += 1; } record_result(p384_timer); -#endif std::unique_ptr p521_timer = make_timer("P-521 redc"); Botan::BigInt r521(rng(), 521*2 - 1); diff --git a/src/cli/timing_tests.cpp b/src/cli/timing_tests.cpp index 63e04b32d..3f5152ec1 100644 --- a/src/cli/timing_tests.cpp +++ b/src/cli/timing_tests.cpp @@ -44,7 +44,7 @@ #include #endif -#if defined(BOTAN_HAS_AUTO_SEEDED_RNG) +#if defined(BOTAN_HAS_AUTO_SEEDING_RNG) #include #endif @@ -96,7 +96,7 @@ class Timing_Test { #if defined(BOTAN_HAS_SYSTEM_RNG) return Botan::system_rng(); -#elif defined(BOTAN_HAS_AUTO_SEEDED_RNG) +#elif defined(BOTAN_HAS_AUTO_SEEDING_RNG) static AutoSeeded_RNG static_timing_test_rng(Botan::Entropy_Sources::global_sources(), 0); return static_timing_test_rng; #else @@ -107,7 +107,7 @@ class Timing_Test }; -#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_EME_PKCS1v15) && defined(BOTAN_HAS_EME_RAW) +#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_EME_PKCS1) && defined(BOTAN_HAS_EME_RAW) class Bleichenbacker_Timing_Test final : public Timing_Test { @@ -544,7 +544,7 @@ BOTAN_REGISTER_COMMAND("timing_test", Timing_Test_Command); std::unique_ptr Timing_Test_Command::lookup_timing_test(const std::string& test_type) { -#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_EME_PKCS1v15) && defined(BOTAN_HAS_EME_RAW) +#if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_EME_PKCS1) && defined(BOTAN_HAS_EME_RAW) if(test_type == "bleichenbacher") { return std::unique_ptr(new Bleichenbacker_Timing_Test(2048)); -- cgit v1.2.3