Skip to content

Commit

Permalink
disable KAT tests if no AES available
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Nov 14, 2023
1 parent 3fdafc6 commit 236627e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tests/test_frodokem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace Botan_Tests {

namespace {

#if defined(BOTAN_HAS_AES)

Botan::FrodoKEMMode get_mode(std::string_view header) {
if(header == "FrodoKEM-640-SHAKE") {
return Botan::FrodoKEMMode::FrodoKEM640_SHAKE;
Expand Down Expand Up @@ -121,6 +123,8 @@ class Frodo_KAT_Tests final : public Text_Based_Test {
}
};

#endif

std::vector<Test::Result> test_frodo_roundtrips() {
auto& rng = Test::rng();

Expand Down Expand Up @@ -220,7 +224,10 @@ class Frodo_Keygen_Tests final : public PK_Key_Generation_Test {

} // namespace

#if defined(BOTAN_HAS_AES)
BOTAN_REGISTER_TEST("frodokem", "frodo_kat_tests", Frodo_KAT_Tests);
#endif

BOTAN_REGISTER_TEST_FN("frodokem", "frodo_roundtrips", test_frodo_roundtrips);
BOTAN_REGISTER_TEST("frodokem", "frodo_keygen", Frodo_Keygen_Tests);

Expand Down

0 comments on commit 236627e

Please sign in to comment.