aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/gost_3410
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/gost_3410')
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.cpp13
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.h5
2 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/pubkey/gost_3410/gost_3410.cpp b/src/lib/pubkey/gost_3410/gost_3410.cpp
index c37c8c845..7fde29bc5 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.cpp
+++ b/src/lib/pubkey/gost_3410/gost_3410.cpp
@@ -214,19 +214,22 @@ bool GOST_3410_Verification_Operation::verify(const byte msg[], size_t msg_len,
}
std::unique_ptr<PK_Ops::Verification>
-GOST_3410_PublicKey::create_verification_op(RandomNumberGenerator& rng,
- const std::string& params,
+GOST_3410_PublicKey::create_verification_op(const std::string& params,
const std::string& provider) const
{
- return std::unique_ptr<PK_Ops::Verification>(new GOST_3410_Verification_Operation(*this, params));
+ if(provider == "base" || provider.empty())
+ return std::unique_ptr<PK_Ops::Verification>(new GOST_3410_Verification_Operation(*this, params));
+ throw Provider_Not_Found(algo_name(), provider);
}
std::unique_ptr<PK_Ops::Signature>
-GOST_3410_PrivateKey::create_signature_op(RandomNumberGenerator& rng,
+GOST_3410_PrivateKey::create_signature_op(RandomNumberGenerator& /*rng*/,
const std::string& params,
const std::string& provider) const
{
- return std::unique_ptr<PK_Ops::Signature>(new GOST_3410_Signature_Operation(*this, params));
+ if(provider == "base" || provider.empty())
+ return std::unique_ptr<PK_Ops::Signature>(new GOST_3410_Signature_Operation(*this, params));
+ throw Provider_Not_Found(algo_name(), provider);
}
}
diff --git a/src/lib/pubkey/gost_3410/gost_3410.h b/src/lib/pubkey/gost_3410/gost_3410.h
index 9d79f48d7..cca811896 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.h
+++ b/src/lib/pubkey/gost_3410/gost_3410.h
@@ -60,8 +60,7 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey
{ return domain().get_order().bytes(); }
std::unique_ptr<PK_Ops::Verification>
- create_verification_op(RandomNumberGenerator& rng,
- const std::string& params,
+ create_verification_op(const std::string& params,
const std::string& provider) const override;
protected:
@@ -97,7 +96,7 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey,
std::unique_ptr<PK_Ops::Signature>
create_signature_op(RandomNumberGenerator& rng,
const std::string& params,
- const std::string& provider) const;
+ const std::string& provider) const override;
};
}