diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_ecdsa.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_ecies.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_ffi.cpp | 6 | ||||
-rw-r--r-- | src/tests/test_pk_pad.cpp | 4 | ||||
-rw-r--r-- | src/tests/unit_ecc.cpp | 3 | ||||
-rw-r--r-- | src/tests/unit_tls.cpp | 4 |
6 files changed, 10 insertions, 11 deletions
diff --git a/src/tests/test_ecdsa.cpp b/src/tests/test_ecdsa.cpp index e1819fe1a..296ae5175 100644 --- a/src/tests/test_ecdsa.cpp +++ b/src/tests/test_ecdsa.cpp @@ -129,7 +129,7 @@ class ECDSA_Signature_KAT_Tests final : public PK_Signature_Generation_Test return "EMSA1(" + hash + ")"; } -#if !defined(BOTAN_HAS_RFC6979) +#if !defined(BOTAN_HAS_RFC6979_GENERATOR) Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const override { // probabilistic ecdsa signature generation extracts more random than just the nonce, diff --git a/src/tests/test_ecies.cpp b/src/tests/test_ecies.cpp index 3f5f0eccf..534a2719e 100644 --- a/src/tests/test_ecies.cpp +++ b/src/tests/test_ecies.cpp @@ -16,7 +16,7 @@ namespace Botan_Tests { namespace { -#if defined(BOTAN_HAS_ECIES) && defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_CBC) +#if defined(BOTAN_HAS_ECIES) && defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_MODE_CBC) using Flags = Botan::ECIES_Flags; diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index b0a8054d9..f2926d777 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -470,7 +470,7 @@ class FFI_Unit_Tests final : public Test { Test::Result result("FFI CBC cipher"); -#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_CBC) +#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_MODE_CBC) botan_cipher_t cipher_encrypt, cipher_decrypt; if(TEST_FFI_OK(botan_cipher_init, (&cipher_encrypt, "AES-128/CBC/PKCS7", BOTAN_CIPHER_INIT_FLAG_ENCRYPT))) @@ -1477,7 +1477,7 @@ class FFI_Unit_Tests final : public Test TEST_FFI_OK(botan_privkey_load, (©, rng, privkey.data(), privkey.size(), nullptr)); botan_privkey_destroy(copy); -#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_PBES2) +#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_PKCS5_PBES2) const size_t pbkdf_iter = 1000; // export private key encrypted @@ -1514,7 +1514,7 @@ class FFI_Unit_Tests final : public Test const std::string pbe_hash = "SHA-512"; #endif -#if defined(BOTAN_HAS_GCM) +#if defined(BOTAN_HAS_AEAD_GCM) const std::string pbe_cipher = "AES-256/GCM"; #else const std::string pbe_cipher = "AES-256/CBC"; diff --git a/src/tests/test_pk_pad.cpp b/src/tests/test_pk_pad.cpp index 7c92cf876..83a712b40 100644 --- a/src/tests/test_pk_pad.cpp +++ b/src/tests/test_pk_pad.cpp @@ -10,13 +10,13 @@ #include <botan/emsa.h> #endif -#if defined(BOTAN_HAS_EME_PKCS1v15) +#if defined(BOTAN_HAS_EME_PKCS1) #include <botan/eme_pkcs.h> #endif namespace Botan_Tests { -#if defined(BOTAN_HAS_EME_PKCS1v15) +#if defined(BOTAN_HAS_EME_PKCS1) class EME_PKCS1v15_Decoding_Tests final : public Text_Based_Test { diff --git a/src/tests/unit_ecc.cpp b/src/tests/unit_ecc.cpp index 869cda277..28b2fadd1 100644 --- a/src/tests/unit_ecc.cpp +++ b/src/tests/unit_ecc.cpp @@ -185,13 +185,13 @@ class NIST_Curve_Reduction_Tests final : public Test { public: typedef std::function<void (Botan::BigInt&, Botan::secure_vector<Botan::word>&)> reducer_fn; + std::vector<Test::Result> run() override { std::vector<Test::Result> results; // Using lambdas here to avoid strange UbSan warning (#1370) -#if defined(BOTAN_HAS_NIST_PRIME_REDUCERS_W32) results.push_back(random_redc_test("P-384", Botan::prime_p384(), [](Botan::BigInt& p, Botan::secure_vector<Botan::word>& ws) -> void { @@ -212,7 +212,6 @@ class NIST_Curve_Reduction_Tests final : public Test { Botan::redc_p192(p, ws); })); -#endif results.push_back(random_redc_test("P-521", Botan::prime_p521(), [](Botan::BigInt& p, Botan::secure_vector<Botan::word>& ws) -> void { diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp index 28b09324f..fa23b5842 100644 --- a/src/tests/unit_tls.cpp +++ b/src/tests/unit_tls.cpp @@ -906,7 +906,7 @@ class TLS_Unit_Tests final : public Test #if defined(BOTAN_HAS_CAMELLIA) && defined(BOTAN_HAS_TLS_CBC) test_modern_versions("Camellia-256 SHA-2", results, *client_ses, *server_ses, *creds, "RSA", "Camellia-256", "SHA-384 SHA-256"); #endif -#if defined(BOTAN_HAS_CAMELLIA) && defined(BOTAN_HAS_GCM) +#if defined(BOTAN_HAS_CAMELLIA) && defined(BOTAN_HAS_AEAD_GCM) test_modern_versions("Camellia-128/GCM ECDH", results, *client_ses, *server_ses, *creds, "ECDH", "Camellia-128/GCM", "AEAD"); #endif @@ -975,7 +975,7 @@ class TLS_Unit_Tests final : public Test test_modern_versions("AES-128/GCM PSK", results, *client_ses, *server_ses, *creds, "PSK", "AES-128/GCM"); -#if defined(BOTAN_HAS_CCM) +#if defined(BOTAN_HAS_AEAD_CCM) test_modern_versions("AES-128/CCM PSK", results, *client_ses, *server_ses, *creds, "PSK", "AES-128/CCM"); test_modern_versions("AES-128/CCM-8 PSK", results, *client_ses, *server_ses, *creds, "PSK", "AES-128/CCM(8)"); #endif |