diff options
-rw-r--r-- | src/cli/timing_tests.cpp | 4 | ||||
-rw-r--r-- | src/cli/tls_utils.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_privatekey.h | 12 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_publickey.h | 12 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_verification_operation.h | 3 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h | 4 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h | 17 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_privatekey.h | 2 | ||||
-rw-r--r-- | src/lib/pubkey/xmss/xmss_wots_publickey.h | 14 | ||||
-rw-r--r-- | src/lib/x509/certstor_sql/certstor_sql.h | 6 | ||||
-rw-r--r-- | src/tests/test_sm2.cpp | 4 |
11 files changed, 39 insertions, 41 deletions
diff --git a/src/cli/timing_tests.cpp b/src/cli/timing_tests.cpp index 511eac8bc..73296e230 100644 --- a/src/cli/timing_tests.cpp +++ b/src/cli/timing_tests.cpp @@ -342,7 +342,7 @@ class Timing_Test_Command : public Command : Command("timing_test test_type --test-data-file= --test-data-dir=src/tests/data/timing " "--warmup-runs=1000 --measurement-runs=10000") {} - virtual void go() override + void go() override { const std::string test_type = get_arg("test_type"); const size_t warmup_runs = get_arg_sz("warmup-runs"); @@ -398,7 +398,7 @@ class Timing_Test_Command : public Command private: std::unique_ptr<Timing_Test> lookup_timing_test(const std::string& test_type); - virtual std::string help_text() const override + std::string help_text() const override { // TODO check feature macros return (Command::help_text() + diff --git a/src/cli/tls_utils.cpp b/src/cli/tls_utils.cpp index 72bbcc9dc..96be073db 100644 --- a/src/cli/tls_utils.cpp +++ b/src/cli/tls_utils.cpp @@ -139,7 +139,7 @@ class TLS_Client_Hello_Reader final : public Command TLS_Client_Hello_Reader() : Command("tls_client_hello --hex input") {} - virtual void go() override + void go() override { const std::string input_file = get_arg("input"); std::vector<uint8_t> input; diff --git a/src/lib/pubkey/xmss/xmss_privatekey.h b/src/lib/pubkey/xmss/xmss_privatekey.h index d61e5c7df..ccba4f26c 100644 --- a/src/lib/pubkey/xmss/xmss_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_privatekey.h @@ -178,35 +178,35 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKe return m_prf; } - virtual void set_public_seed( + void set_public_seed( const secure_vector<uint8_t>& public_seed) override { m_public_seed = public_seed; m_wots_priv_key.set_public_seed(public_seed); } - virtual void set_public_seed(secure_vector<uint8_t>&& public_seed) override + void set_public_seed(secure_vector<uint8_t>&& public_seed) override { m_public_seed = std::move(public_seed); m_wots_priv_key.set_public_seed(m_public_seed); } - virtual const secure_vector<uint8_t>& public_seed() const override + const secure_vector<uint8_t>& public_seed() const override { return m_public_seed; } - virtual std::unique_ptr<PK_Ops::Signature> + std::unique_ptr<PK_Ops::Signature> create_signature_op(RandomNumberGenerator&, const std::string&, const std::string& provider) const override; - virtual secure_vector<uint8_t> private_key_bits() const override + secure_vector<uint8_t> private_key_bits() const override { return raw_private_key(); } - virtual size_t size() const override + size_t size() const override { return XMSS_PublicKey::size() + sizeof(uint64_t) + diff --git a/src/lib/pubkey/xmss/xmss_publickey.h b/src/lib/pubkey/xmss/xmss_publickey.h index af14b15b6..b415f0a59 100644 --- a/src/lib/pubkey/xmss/xmss_publickey.h +++ b/src/lib/pubkey/xmss/xmss_publickey.h @@ -187,26 +187,26 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PublicKey : public virtual Public_Key return "XMSS"; } - virtual AlgorithmIdentifier algorithm_identifier() const override + AlgorithmIdentifier algorithm_identifier() const override { return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_NULL_PARAM); } - virtual bool check_key(RandomNumberGenerator&, bool) const override + bool check_key(RandomNumberGenerator&, bool) const override { return true; } - virtual std::unique_ptr<PK_Ops::Verification> + std::unique_ptr<PK_Ops::Verification> create_verification_op(const std::string&, const std::string& provider) const override; - virtual size_t estimated_strength() const override + size_t estimated_strength() const override { return m_xmss_params.estimated_strength(); } - virtual size_t key_length() const override + size_t key_length() const override { return m_xmss_params.estimated_strength(); } @@ -217,7 +217,7 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PublicKey : public virtual Public_Key * * @return raw public key bits. **/ - virtual std::vector<uint8_t> public_key_bits() const override + std::vector<uint8_t> public_key_bits() const override { return raw_public_key(); } diff --git a/src/lib/pubkey/xmss/xmss_verification_operation.h b/src/lib/pubkey/xmss/xmss_verification_operation.h index f5079303c..de3d22ae6 100644 --- a/src/lib/pubkey/xmss/xmss_verification_operation.h +++ b/src/lib/pubkey/xmss/xmss_verification_operation.h @@ -34,8 +34,7 @@ namespace Botan { virtual ~XMSS_Verification_Operation() = default; - virtual bool is_valid_signature(const uint8_t sig[], - size_t sig_len) override; + bool is_valid_signature(const uint8_t sig[], size_t sig_len) override; void update(const uint8_t msg[], size_t msg_len) override; diff --git a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h index 227ef211c..e18c69699 100644 --- a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h @@ -48,13 +48,13 @@ class XMSS_WOTS_Addressed_PrivateKey const XMSS_WOTS_PrivateKey& private_key() const { return m_priv_key; } XMSS_WOTS_PrivateKey& private_key() { return m_priv_key; } - virtual AlgorithmIdentifier + AlgorithmIdentifier pkcs8_algorithm_identifier() const override { return m_priv_key.pkcs8_algorithm_identifier(); } - virtual secure_vector<uint8_t> private_key_bits() const override + secure_vector<uint8_t> private_key_bits() const override { return m_priv_key.private_key_bits(); } diff --git a/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h b/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h index 3570a5908..7d4ee6870 100644 --- a/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h +++ b/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h @@ -44,45 +44,44 @@ class XMSS_WOTS_Addressed_PublicKey : public virtual Public_Key const XMSS_Address& address() const { return m_adrs; } XMSS_Address& address() { return m_adrs; } - virtual std::string algo_name() const override + std::string algo_name() const override { return m_pub_key.algo_name(); } - virtual AlgorithmIdentifier algorithm_identifier() const override + AlgorithmIdentifier algorithm_identifier() const override { return m_pub_key.algorithm_identifier(); } - virtual bool check_key(RandomNumberGenerator& rng, - bool strong) const override + bool check_key(RandomNumberGenerator& rng, bool strong) const override { return m_pub_key.check_key(rng, strong); } - virtual std::unique_ptr<PK_Ops::Verification> + std::unique_ptr<PK_Ops::Verification> create_verification_op(const std::string& params, const std::string& provider) const override { return m_pub_key.create_verification_op(params, provider); } - virtual OID get_oid() const override + OID get_oid() const override { return m_pub_key.get_oid(); } - virtual size_t estimated_strength() const override + size_t estimated_strength() const override { return m_pub_key.estimated_strength(); } - virtual size_t key_length() const override + size_t key_length() const override { return m_pub_key.estimated_strength(); } - virtual std::vector<uint8_t> public_key_bits() const override + std::vector<uint8_t> public_key_bits() const override { return m_pub_key.public_key_bits(); } diff --git a/src/lib/pubkey/xmss/xmss_wots_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_privatekey.h index f327df77b..5e15f9b24 100644 --- a/src/lib/pubkey/xmss/xmss_wots_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_wots_privatekey.h @@ -225,7 +225,7 @@ class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PrivateKey final : public virtual XMSS_WOT const std::string&, const std::string& provider) const override; - virtual secure_vector<uint8_t> private_key_bits() const override + secure_vector<uint8_t> private_key_bits() const override { throw Not_Implemented("No PKCS8 key format defined for XMSS-WOTS."); } diff --git a/src/lib/pubkey/xmss/xmss_wots_publickey.h b/src/lib/pubkey/xmss/xmss_wots_publickey.h index 57009154b..aa30bd304 100644 --- a/src/lib/pubkey/xmss/xmss_wots_publickey.h +++ b/src/lib/pubkey/xmss/xmss_wots_publickey.h @@ -231,36 +231,36 @@ class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PublicKey : virtual public Public_Key return m_wots_params; } - virtual std::string algo_name() const override + std::string algo_name() const override { return m_wots_params.name(); } - virtual AlgorithmIdentifier algorithm_identifier() const override + AlgorithmIdentifier algorithm_identifier() const override { throw Not_Implemented("No AlgorithmIdentifier available for XMSS-WOTS."); } - virtual bool check_key(RandomNumberGenerator&, bool) const override + bool check_key(RandomNumberGenerator&, bool) const override { return true; } - virtual std::unique_ptr<PK_Ops::Verification> + std::unique_ptr<PK_Ops::Verification> create_verification_op(const std::string&, const std::string& provider) const override; - virtual size_t estimated_strength() const override + size_t estimated_strength() const override { return m_wots_params.estimated_strength(); } - virtual size_t key_length() const override + size_t key_length() const override { return m_wots_params.estimated_strength(); } - virtual std::vector<uint8_t> public_key_bits() const override + std::vector<uint8_t> public_key_bits() const override { throw Not_Implemented("No key format defined for XMSS-WOTS"); } diff --git a/src/lib/x509/certstor_sql/certstor_sql.h b/src/lib/x509/certstor_sql/certstor_sql.h index 962b107a5..88e3968bf 100644 --- a/src/lib/x509/certstor_sql/certstor_sql.h +++ b/src/lib/x509/certstor_sql/certstor_sql.h @@ -40,7 +40,7 @@ class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_SQL : public Certificate_Store /** * Returns the first certificate with matching subject DN and optional key ID. */ - virtual std::shared_ptr<const X509_Certificate> + std::shared_ptr<const X509_Certificate> find_cert(const X509_DN& subject_dn, const std::vector<uint8_t>& key_id) const override; std::shared_ptr<const X509_Certificate> @@ -52,7 +52,7 @@ class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_SQL : public Certificate_Store /** * Returns all subject DNs known to the store instance. */ - virtual std::vector<X509_DN> all_subjects() const override; + std::vector<X509_DN> all_subjects() const override; /** * Inserts "cert" into the store, returns false if the certificate is @@ -97,7 +97,7 @@ class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_SQL : public Certificate_Store /** * Generates a CRL for all certificates issued by the given issuer. */ - virtual std::shared_ptr<const X509_CRL> + std::shared_ptr<const X509_CRL> find_crl_for(const X509_Certificate& issuer) const override; private: diff --git a/src/tests/test_sm2.cpp b/src/tests/test_sm2.cpp index d81d2c8a8..16b82b792 100644 --- a/src/tests/test_sm2.cpp +++ b/src/tests/test_sm2.cpp @@ -29,7 +29,7 @@ class SM2_Signature_KAT_Tests final : public PK_Signature_Generation_Test "P,A,B,xG,yG,Order,Cofactor,Ident,Msg,x,Nonce,Signature", "Hash") {} - virtual std::string default_padding(const VarMap& vars) const override + std::string default_padding(const VarMap& vars) const override { return get_req_str(vars, "Ident") + "," + get_opt_str(vars, "Hash", "SM3"); } @@ -73,7 +73,7 @@ class SM2_Encryption_KAT_Tests final : public PK_Encryption_Decryption_Test "P,A,B,xG,yG,Order,Cofactor,Msg,x,Nonce,Ciphertext", "Hash") {} - virtual std::string default_padding(const VarMap& vars) const override + std::string default_padding(const VarMap& vars) const override { return get_opt_str(vars, "Hash", "SM3"); } |