Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: silent module dependencies in TLS and XMSS tests #3632

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/tests/test_tls_messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class TLS_Message_Parsing_Test final : public Text_Based_Test {
BOTAN_REGISTER_TEST("tls", "tls_messages", TLS_Message_Parsing_Test);

#if defined(BOTAN_HAS_TLS_13)
#if defined(BOTAN_HAS_CURVE_25519)
class TLS_Key_Share_CH_Generation_Test final : public Text_Based_Test {
public:
TLS_Key_Share_CH_Generation_Test() :
Expand Down Expand Up @@ -238,6 +239,10 @@ class TLS_Key_Share_CH_Generation_Test final : public Text_Based_Test {
}
};

BOTAN_REGISTER_TEST("tls_extensions", "tls_extensions_key_share_client_hello", TLS_Key_Share_CH_Generation_Test);

#endif

class TLS_Extension_Parsing_Test final : public Text_Based_Test {
public:
TLS_Extension_Parsing_Test() :
Expand Down Expand Up @@ -393,7 +398,6 @@ class TLS_Extension_Parsing_Test final : public Text_Based_Test {
};

BOTAN_REGISTER_TEST("tls_extensions", "tls_extensions_parsing", TLS_Extension_Parsing_Test);
BOTAN_REGISTER_TEST("tls_extensions", "tls_extensions_key_share_client_hello", TLS_Key_Share_CH_Generation_Test);

class TLS_13_Message_Parsing_Test final : public Text_Based_Test {
public:
Expand Down
7 changes: 7 additions & 0 deletions src/tests/test_xmss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#if defined(BOTAN_HAS_XMSS_RFC8391)
#include "test_pubkey.h"
#include "test_rng.h"
#include <botan/hash.h>
#include <botan/xmss.h>
#endif

Expand Down Expand Up @@ -116,6 +117,12 @@ class XMSS_Keygen_Reference_Test final : public Text_Based_Test {
}

bool skip_this_test(const std::string& /*header*/, const VarMap& vars) override {
// skip if this build does not provide the requested hash function
const auto params = Botan::XMSS_Parameters(vars.get_req_str("Params"));
if(Botan::HashFunction::create(params.hash_function_name()) == nullptr) {
return true;
}

if(Test::run_long_tests()) {
return false;
}
Expand Down