aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/asn1/der_enc.h2
-rw-r--r--src/lib/block/aes/aes.cpp6
-rw-r--r--src/lib/block/cast/cast128.cpp2
-rw-r--r--src/lib/math/numbertheory/dsa_gen.cpp2
-rw-r--r--src/lib/pubkey/mce/code_based_key_gen.cpp2
-rw-r--r--src/lib/pubkey/newhope/newhope.h2
-rw-r--r--src/lib/pubkey/xmss/atomic.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_address.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_hash.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_index_registry.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_signature.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_tools.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_verification_operation.h5
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h6
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_parameters.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_publickey.h2
-rw-r--r--src/lib/tls/tls_messages.h4
-rw-r--r--src/lib/utils/http_util/http_util.h2
-rw-r--r--src/lib/utils/mutex.h4
19 files changed, 26 insertions, 27 deletions
diff --git a/src/lib/asn1/der_enc.h b/src/lib/asn1/der_enc.h
index 7ffa824e6..f1e85101c 100644
--- a/src/lib/asn1/der_enc.h
+++ b/src/lib/asn1/der_enc.h
@@ -115,7 +115,7 @@ class BOTAN_PUBLIC_API(2,0) DER_Encoder final
uint8_t val);
private:
- class DER_Sequence
+ class DER_Sequence final
{
public:
ASN1_Tag tag_of() const;
diff --git a/src/lib/block/aes/aes.cpp b/src/lib/block/aes/aes.cpp
index 268e0804d..6afa5133a 100644
--- a/src/lib/block/aes/aes.cpp
+++ b/src/lib/block/aes/aes.cpp
@@ -119,7 +119,7 @@ inline uint32_t SE_word(uint32_t x)
const uint32_t* AES_TE()
{
- class TE_Table
+ class TE_Table final
{
public:
TE_Table()
@@ -137,7 +137,7 @@ const uint32_t* AES_TE()
return reinterpret_cast<const uint32_t*>(data);
}
private:
- std::aligned_storage<sizeof(uint32_t), 1024>::type data[256];
+ std::aligned_storage<256*sizeof(uint32_t), 64>::type data[256];
};
static TE_Table table;
@@ -146,7 +146,7 @@ const uint32_t* AES_TE()
const uint32_t* AES_TD()
{
- class TD_Table
+ class TD_Table final
{
public:
TD_Table()
diff --git a/src/lib/block/cast/cast128.cpp b/src/lib/block/cast/cast128.cpp
index d54d0614e..5ad732eb3 100644
--- a/src/lib/block/cast/cast128.cpp
+++ b/src/lib/block/cast/cast128.cpp
@@ -320,7 +320,7 @@ void CAST_128::cast_ks(secure_vector<uint32_t>& K,
0xA466BB1E, 0xF8DA0A82, 0x04F19130, 0xBA6E4EC0, 0x99265164, 0x1EE7230D,
0x50B2AD80, 0xEAEE6801, 0x8DB2A283, 0xEA8BF59E };
- class ByteReader
+ class ByteReader final
{
public:
uint8_t operator()(size_t i) const
diff --git a/src/lib/math/numbertheory/dsa_gen.cpp b/src/lib/math/numbertheory/dsa_gen.cpp
index 55190d60b..30be0eaab 100644
--- a/src/lib/math/numbertheory/dsa_gen.cpp
+++ b/src/lib/math/numbertheory/dsa_gen.cpp
@@ -56,7 +56,7 @@ bool generate_dsa_primes(RandomNumberGenerator& rng,
const size_t HASH_SIZE = hash->output_length();
- class Seed
+ class Seed final
{
public:
explicit Seed(const std::vector<uint8_t>& s) : m_seed(s) {}
diff --git a/src/lib/pubkey/mce/code_based_key_gen.cpp b/src/lib/pubkey/mce/code_based_key_gen.cpp
index 01650af26..b655b543b 100644
--- a/src/lib/pubkey/mce/code_based_key_gen.cpp
+++ b/src/lib/pubkey/mce/code_based_key_gen.cpp
@@ -19,7 +19,7 @@ namespace Botan {
namespace {
-class binary_matrix
+class binary_matrix final
{
public:
binary_matrix(uint32_t m_rown, uint32_t m_coln);
diff --git a/src/lib/pubkey/newhope/newhope.h b/src/lib/pubkey/newhope/newhope.h
index 070652db9..3b6df1c21 100644
--- a/src/lib/pubkey/newhope/newhope.h
+++ b/src/lib/pubkey/newhope/newhope.h
@@ -25,7 +25,7 @@ class RandomNumberGenerator;
*/
// TODO: change to just a secure_vector
-class newhope_poly
+class newhope_poly final
{
public:
uint16_t coeffs[1024];
diff --git a/src/lib/pubkey/xmss/atomic.h b/src/lib/pubkey/xmss/atomic.h
index 760ffddc3..d2e65c104 100644
--- a/src/lib/pubkey/xmss/atomic.h
+++ b/src/lib/pubkey/xmss/atomic.h
@@ -20,7 +20,7 @@ template <typename T>
* std::vector. The construction of instances of this wrapper is NOT atomic
* and needs to be properly guarded.
**/
-class Atomic
+class Atomic final
{
public:
Atomic() = default;
diff --git a/src/lib/pubkey/xmss/xmss_address.h b/src/lib/pubkey/xmss/xmss_address.h
index 3838ed48f..f00343ca3 100644
--- a/src/lib/pubkey/xmss/xmss_address.h
+++ b/src/lib/pubkey/xmss/xmss_address.h
@@ -18,7 +18,7 @@ namespace Botan {
* OTS-Hash-Address can be called depending on the type currently
* assigned to the XMSS address using set_type().
**/
-class XMSS_Address
+class XMSS_Address final
{
public:
/**
diff --git a/src/lib/pubkey/xmss/xmss_hash.h b/src/lib/pubkey/xmss/xmss_hash.h
index 7dcfb8465..16380f8f1 100644
--- a/src/lib/pubkey/xmss/xmss_hash.h
+++ b/src/lib/pubkey/xmss/xmss_hash.h
@@ -16,7 +16,7 @@ namespace Botan {
* A collection of pseudorandom hash functions required for XMSS and WOTS
* computations.
**/
-class XMSS_Hash
+class XMSS_Hash final
{
public:
XMSS_Hash(const std::string& h_func_name);
diff --git a/src/lib/pubkey/xmss/xmss_index_registry.h b/src/lib/pubkey/xmss/xmss_index_registry.h
index d7448693a..27a68631a 100644
--- a/src/lib/pubkey/xmss/xmss_index_registry.h
+++ b/src/lib/pubkey/xmss/xmss_index_registry.h
@@ -18,7 +18,7 @@ namespace Botan {
* A registry for XMSS private keys, keeps track of the leaf index for
* independend copies of the same key.
**/
-class XMSS_Index_Registry
+class XMSS_Index_Registry final
{
public:
XMSS_Index_Registry(const XMSS_Index_Registry&) = delete;
diff --git a/src/lib/pubkey/xmss/xmss_signature.h b/src/lib/pubkey/xmss/xmss_signature.h
index 493697d51..838aae2e8 100644
--- a/src/lib/pubkey/xmss/xmss_signature.h
+++ b/src/lib/pubkey/xmss/xmss_signature.h
@@ -17,7 +17,7 @@
namespace Botan {
-class XMSS_Signature
+class XMSS_Signature final
{
public:
/**
diff --git a/src/lib/pubkey/xmss/xmss_tools.h b/src/lib/pubkey/xmss/xmss_tools.h
index 564a40c52..306598187 100644
--- a/src/lib/pubkey/xmss/xmss_tools.h
+++ b/src/lib/pubkey/xmss/xmss_tools.h
@@ -19,7 +19,7 @@ namespace Botan {
* Helper tools for low level byte operations required
* for the XMSS implementation.
**/
- class XMSS_Tools
+ class XMSS_Tools final
{
public:
XMSS_Tools(const XMSS_Tools&) = delete;
diff --git a/src/lib/pubkey/xmss/xmss_verification_operation.h b/src/lib/pubkey/xmss/xmss_verification_operation.h
index 1b42bb158..6e8469392 100644
--- a/src/lib/pubkey/xmss/xmss_verification_operation.h
+++ b/src/lib/pubkey/xmss/xmss_verification_operation.h
@@ -24,9 +24,8 @@ namespace Botan {
* Provides signature verification capabilities for Extended Hash-Based
* Signatures (XMSS).
**/
- class XMSS_Verification_Operation
- final : public virtual PK_Ops::Verification,
- public XMSS_Common_Ops
+ class XMSS_Verification_Operation final : public virtual PK_Ops::Verification,
+ public XMSS_Common_Ops
{
public:
XMSS_Verification_Operation(
diff --git a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h
index e18c69699..62beaaece 100644
--- a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h
@@ -21,9 +21,9 @@ namespace Botan {
* needs to be stored together with the key and passed to the
* XMSS_WOTS_Signature_Operation() on creation.
**/
-class XMSS_WOTS_Addressed_PrivateKey
- final : public virtual XMSS_WOTS_Addressed_PublicKey,
- public virtual Private_Key
+class XMSS_WOTS_Addressed_PrivateKey final :
+ public virtual XMSS_WOTS_Addressed_PublicKey,
+ public virtual Private_Key
{
public:
XMSS_WOTS_Addressed_PrivateKey(const XMSS_WOTS_PrivateKey& private_key)
diff --git a/src/lib/pubkey/xmss/xmss_wots_parameters.h b/src/lib/pubkey/xmss/xmss_wots_parameters.h
index 0e16b900b..0c2825017 100644
--- a/src/lib/pubkey/xmss/xmss_wots_parameters.h
+++ b/src/lib/pubkey/xmss/xmss_wots_parameters.h
@@ -24,7 +24,7 @@ namespace Botan {
* https://datatracker.ietf.org/doc/
* draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1
**/
-class XMSS_WOTS_Parameters
+class XMSS_WOTS_Parameters final
{
public:
enum ots_algorithm_t
diff --git a/src/lib/pubkey/xmss/xmss_wots_publickey.h b/src/lib/pubkey/xmss/xmss_wots_publickey.h
index aa30bd304..1c7366f0b 100644
--- a/src/lib/pubkey/xmss/xmss_wots_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_publickey.h
@@ -32,7 +32,7 @@ typedef std::vector<secure_vector<uint8_t>> wots_keysig_t;
class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PublicKey : virtual public Public_Key
{
public:
- class TreeSignature
+ class TreeSignature final
{
public:
TreeSignature() = default;
diff --git a/src/lib/tls/tls_messages.h b/src/lib/tls/tls_messages.h
index 4370f6fe2..ac6c1e1ad 100644
--- a/src/lib/tls/tls_messages.h
+++ b/src/lib/tls/tls_messages.h
@@ -68,7 +68,7 @@ class BOTAN_UNSTABLE_API Hello_Verify_Request final : public Handshake_Message
class BOTAN_UNSTABLE_API Client_Hello final : public Handshake_Message
{
public:
- class Settings
+ class Settings final
{
public:
Settings(const Protocol_Version version,
@@ -182,7 +182,7 @@ class BOTAN_UNSTABLE_API Client_Hello final : public Handshake_Message
class BOTAN_UNSTABLE_API Server_Hello final : public Handshake_Message
{
public:
- class Settings
+ class Settings final
{
public:
Settings(const std::vector<uint8_t> new_session_id,
diff --git a/src/lib/utils/http_util/http_util.h b/src/lib/utils/http_util/http_util.h
index 528a4fae8..ea6122c07 100644
--- a/src/lib/utils/http_util/http_util.h
+++ b/src/lib/utils/http_util/http_util.h
@@ -19,7 +19,7 @@ namespace Botan {
namespace HTTP {
-class Response
+class Response final
{
public:
Response() : m_status_code(0), m_status_message("Uninitialized") {}
diff --git a/src/lib/utils/mutex.h b/src/lib/utils/mutex.h
index 46a652bba..6e24815bb 100644
--- a/src/lib/utils/mutex.h
+++ b/src/lib/utils/mutex.h
@@ -27,7 +27,7 @@ typedef std::mutex mutex_type;
namespace Botan {
template<typename Mutex>
-class lock_guard
+class lock_guard final
{
public:
explicit lock_guard(Mutex& m) : m_mutex(m)
@@ -41,7 +41,7 @@ class lock_guard
Mutex& m_mutex;
};
-class noop_mutex
+class noop_mutex final
{
public:
void lock() {}