aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cli/speed.cpp9
-rw-r--r--src/cli/utils.cpp5
-rw-r--r--src/lib/base/info.txt1
3 files changed, 12 insertions, 3 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index bb4a42344..212ba23e9 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -20,7 +20,6 @@
#include <botan/block_cipher.h>
#include <botan/stream_cipher.h>
#include <botan/hash.h>
-#include <botan/mac.h>
#include <botan/cipher_mode.h>
#include <botan/entropy_src.h>
#include <botan/parsing.h>
@@ -28,6 +27,10 @@
#include <botan/internal/os_utils.h>
#include <botan/version.h>
+#if defined(BOTAN_HAS_MAC)
+ #include <botan/mac.h>
+#endif
+
#if defined(BOTAN_HAS_AUTO_SEEDING_RNG)
#include <botan/auto_rng.h>
#endif
@@ -713,12 +716,14 @@ class Speed final : public Command
auto dec = Botan::get_cipher_mode(algo, Botan::DECRYPTION);
bench_cipher_mode(*enc, *dec, msec, buf_sizes);
}
+#if defined(BOTAN_HAS_MAC)
else if(Botan::MessageAuthenticationCode::providers(algo).size() > 0)
{
bench_providers_of<Botan::MessageAuthenticationCode>(
algo, provider, msec, buf_sizes,
std::bind(&Speed::bench_mac, this, _1, _2, _3, _4));
}
+#endif
#if defined(BOTAN_HAS_RSA)
else if(algo == "RSA")
{
@@ -1021,6 +1026,7 @@ class Speed final : public Command
}
}
+#if defined(BOTAN_HAS_MAC)
void bench_mac(
Botan::MessageAuthenticationCode& mac,
const std::string& provider,
@@ -1040,6 +1046,7 @@ class Speed final : public Command
record_result(timer);
}
}
+#endif
void bench_cipher_mode(
Botan::Cipher_Mode& enc,
diff --git a/src/cli/utils.cpp b/src/cli/utils.cpp
index 161cc24bf..ebc9673bd 100644
--- a/src/cli/utils.cpp
+++ b/src/cli/utils.cpp
@@ -9,13 +9,16 @@
#include <botan/version.h>
#include <botan/hash.h>
-#include <botan/mac.h>
#include <botan/rng.h>
#include <botan/cpuid.h>
#include <botan/hex.h>
#include <botan/parsing.h>
#include <sstream>
+#if defined(BOTAN_HAS_MAC)
+ #include <botan/mac.h>
+#endif
+
#if defined(BOTAN_HAS_BASE64_CODEC)
#include <botan/base64.h>
#endif
diff --git a/src/lib/base/info.txt b/src/lib/base/info.txt
index 001ed9e1b..c5f89f470 100644
--- a/src/lib/base/info.txt
+++ b/src/lib/base/info.txt
@@ -14,7 +14,6 @@ symkey.h
block
hash
hex
-mac
modes
rng
stream