aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ocb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_ocb.cpp')
-rw-r--r--src/tests/test_ocb.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/tests/test_ocb.cpp b/src/tests/test_ocb.cpp
index 513b34dc2..4069625b5 100644
--- a/src/tests/test_ocb.cpp
+++ b/src/tests/test_ocb.cpp
@@ -5,9 +5,12 @@
*/
#include "tests.h"
-#include <iostream>
#if defined(BOTAN_HAS_AEAD_OCB)
+
+#if defined(BOTAN_HAS_AES)
+
+#include <iostream>
#include <botan/ocb.h>
#include <botan/hex.h>
#include <botan/sha2_32.h>
@@ -102,14 +105,11 @@ size_t test_ocb_long(size_t keylen, size_t taglen,
}
}
-#endif
size_t test_ocb()
{
size_t fails = 0;
-#if defined(BOTAN_HAS_AEAD_OCB)
-
fails += test_ocb_long(128, 128, "67E944D23256C5E0B6C61FA22FDF1EA2");
fails += test_ocb_long(192, 128, "F673F2C3E7174AAE7BAE986CA9F29E17");
fails += test_ocb_long(256, 128, "D90EB8E9C977C88B79DD793D7FFA161C");
@@ -120,7 +120,18 @@ size_t test_ocb()
fails += test_ocb_long(192, 64, "0066BC6E0EF34E24");
fails += test_ocb_long(256, 64, "7D4EA5D445501CBE");
test_report("OCB long", 9, fails);
-#endif
return fails;
}
+
+#else
+
+UNTESTED_WARNING(ocb);
+
+#endif // BOTAN_HAS_AES
+
+#else
+
+SKIP_TEST(ocb);
+
+#endif // BOTAN_HAS_AEAD_OCB