aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_sm2.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-06 13:26:31 -0400
committerJack Lloyd <[email protected]>2017-09-06 13:26:31 -0400
commit5a2db384a328dde3d5059fcdc2ebc1ff9a6039a7 (patch)
tree123e15077484a1d012541017d15e5c0814e7633d /src/tests/test_sm2.cpp
parentfe277cb0d2656c2fb9b06eed838481356a8b4f8a (diff)
Support arbitrary hashes for SM2 signatures
This is a contribution from Ribose Inc
Diffstat (limited to 'src/tests/test_sm2.cpp')
-rw-r--r--src/tests/test_sm2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test_sm2.cpp b/src/tests/test_sm2.cpp
index 7172605bf..0497ccedd 100644
--- a/src/tests/test_sm2.cpp
+++ b/src/tests/test_sm2.cpp
@@ -27,11 +27,11 @@ class SM2_Signature_KAT_Tests : public PK_Signature_Generation_Test
"SM2",
"pubkey/sm2_sig.vec",
"P,A,B,xG,yG,Order,Cofactor,Ident,Msg,x,Nonce,Signature",
- "") {}
+ "Hash") {}
virtual std::string default_padding(const VarMap& vars) const override
{
- return get_req_str(vars, "Ident");
+ return get_req_str(vars, "Ident") + "," + get_opt_str(vars, "Hash", "SM3");
}
Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const override