diff options
Diffstat (limited to 'src/tests/test_sm2.cpp')
-rw-r--r-- | src/tests/test_sm2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/test_sm2.cpp b/src/tests/test_sm2.cpp index 88d872435..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 @@ -71,11 +71,11 @@ class SM2_Encryption_KAT_Tests : public PK_Encryption_Decryption_Test "SM2", "pubkey/sm2_enc.vec", "P,A,B,xG,yG,Order,Cofactor,Msg,x,Nonce,Ciphertext", - "") {} + "Hash") {} - virtual std::string default_padding(const VarMap&) const override + virtual std::string default_padding(const VarMap& vars) const override { - return ""; + return get_opt_str(vars, "Hash", "SM3"); } Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const override |