aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_xmss.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-12 03:16:55 -0500
committerJack Lloyd <[email protected]>2016-11-12 03:19:29 -0500
commit37c1a62525c74461693789f983a41c80697ff4a3 (patch)
tree7e4b90566d6c3514cb05c6afd1d7e0d91447fbb9 /src/tests/test_xmss.cpp
parenteaa558a4224c1bac6228f74be908765ccd1a996a (diff)
Add params to XMSS test inputs
This prevents the test suite from globbing all the XMSS tests together under "XMSS/Raw"; since XMSS ignores the padding anyway, pretend the param string is the padding which causes the normal logic in the signature test code to do the right thing.
Diffstat (limited to 'src/tests/test_xmss.cpp')
-rw-r--r--src/tests/test_xmss.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/tests/test_xmss.cpp b/src/tests/test_xmss.cpp
index dd53d9b7f..2cf942655 100644
--- a/src/tests/test_xmss.cpp
+++ b/src/tests/test_xmss.cpp
@@ -24,11 +24,14 @@ class XMSS_Signature_Tests : public PK_Signature_Generation_Test
XMSS_Signature_Tests() : PK_Signature_Generation_Test(
"XMSS",
"pubkey/xmss_sig.vec",
- {"Msg", "PrivateKey", "Signature"},
+ {"Params", "Msg", "PrivateKey", "Signature"},
{})
{}
- std::string default_padding(const VarMap&) const override { return "Raw"; }
+ std::string default_padding(const VarMap& vars) const override
+ {
+ return get_req_str(vars, "Params");
+ }
std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override
{
@@ -46,11 +49,14 @@ class XMSS_Signature_Verify_Tests : public PK_Signature_Verification_Test
XMSS_Signature_Verify_Tests() : PK_Signature_Verification_Test(
"XMSS",
"pubkey/xmss_verify.vec",
- {"Msg", "PublicKey", "Signature"},
+ {"Params", "Msg", "PublicKey", "Signature"},
{})
{}
- std::string default_padding(const VarMap&) const override { return "Raw"; }
+ std::string default_padding(const VarMap& vars) const override
+ {
+ return get_req_str(vars, "Params");
+ }
std::unique_ptr<Botan::Public_Key> load_public_key(const VarMap& vars) override
{