Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Sep 11, 2024
1 parent 0550f75 commit e89338c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/lib/pubkey/gost_3410/gost_3410.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,16 @@ PK_Signature_Options gost_hash_from_algid(const AlgorithmIdentifier& alg_id) {
* GOST-34.10 verification operation
*/
class GOST_3410_Verification_Operation final : public PK_Ops::Verification_with_Hash {
private:
GOST_3410_Verification_Operation(const GOST_3410_PublicKey& gost, PK_Signature_Options&& options) :

Check warning on line 202 in src/lib/pubkey/gost_3410/gost_3410.cpp

View workflow job for this annotation

GitHub Actions / Clang Tidy

rvalue reference parameter 'options' is never moved from inside the function body
PK_Ops::Verification_with_Hash(options), m_group(gost.domain()), m_gy_mul(gost._public_key()) {}

public:
GOST_3410_Verification_Operation(const GOST_3410_PublicKey& gost, PK_Signature_Options& options) :
PK_Ops::Verification_with_Hash(options), m_group(gost.domain()), m_gy_mul(gost._public_key()) {}

GOST_3410_Verification_Operation(const GOST_3410_PublicKey& gost, const AlgorithmIdentifier& alg_id) :
PK_Ops::Verification_with_Hash(gost_hash_from_algid(alg_id)),
m_group(gost.domain()),
m_gy_mul(gost._public_key()) {}
GOST_3410_Verification_Operation(gost, gost_hash_from_algid(alg_id)) {}

bool verify(std::span<const uint8_t> msg, std::span<const uint8_t> sig) override;

Expand Down
4 changes: 0 additions & 4 deletions src/lib/pubkey/pk_ops_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ class Verification_with_Hash : public Verification {
protected:
explicit Verification_with_Hash(PK_Signature_Options& options);

explicit Verification_with_Hash(PK_Signature_Options&& options) : Verification_with_Hash(options) {}

explicit Verification_with_Hash(const AlgorithmIdentifier& alg_id,
std::string_view pk_algo,
bool allow_null_parameters = false);
Expand Down Expand Up @@ -89,8 +87,6 @@ class Signature_with_Hash : public Signature {
protected:
explicit Signature_with_Hash(PK_Signature_Options& options);

explicit Signature_with_Hash(PK_Signature_Options&& options) : Signature_with_Hash(options) {}

std::string hash_function() const final { return m_hash->name(); }

#if defined(BOTAN_HAS_RFC6979_GENERATOR)
Expand Down

0 comments on commit e89338c

Please sign in to comment.