From 37c1a62525c74461693789f983a41c80697ff4a3 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 12 Nov 2016 03:16:55 -0500 Subject: 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. --- src/tests/test_xmss.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/tests/test_xmss.cpp') 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 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 load_public_key(const VarMap& vars) override { -- cgit v1.2.3