aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ecdsa.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-15 17:15:22 -0400
committerJack Lloyd <[email protected]>2017-08-15 17:15:22 -0400
commitdefe02db7b384ce2454122bf61949379e4a8181b (patch)
tree896e395560a7180b381e459fc4b7bf7be5ded77a /src/tests/test_ecdsa.cpp
parentba75558b723ae0c8b1e3b8718d972ef2fa567dfd (diff)
Allow signature using `Raw(hashname)`
This confirms the message is exactly the size of the expected hash, and also causes RFC 6979 nonces to be generated using the specified hash. See also https://github.com/riboseinc/rnp/issues/367
Diffstat (limited to 'src/tests/test_ecdsa.cpp')
-rw-r--r--src/tests/test_ecdsa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test_ecdsa.cpp b/src/tests/test_ecdsa.cpp
index 9b8c2200e..5d9c327a8 100644
--- a/src/tests/test_ecdsa.cpp
+++ b/src/tests/test_ecdsa.cpp
@@ -52,7 +52,7 @@ class ECDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test
std::string default_padding(const VarMap& vars) const override
{
const std::string hash = get_req_str(vars, "Hash");
- if(hash == "Raw")
+ if(hash.substr(0,3) == "Raw")
return hash;
return "EMSA1(" + hash + ")";
}