diff options
Diffstat (limited to 'src/lib')
153 files changed, 243 insertions, 242 deletions
diff --git a/src/lib/asn1/asn1_obj.h b/src/lib/asn1/asn1_obj.h index 133166d28..65a4919fd 100644 --- a/src/lib/asn1/asn1_obj.h +++ b/src/lib/asn1/asn1_obj.h @@ -82,7 +82,7 @@ class BOTAN_PUBLIC_API(2,0) ASN1_Object /** * BER Encoded Object */ -class BOTAN_PUBLIC_API(2,0) BER_Object +class BOTAN_PUBLIC_API(2,0) BER_Object final { public: void assert_is_a(ASN1_Tag, ASN1_Tag); @@ -123,7 +123,7 @@ struct BOTAN_PUBLIC_API(2,0) BER_Decoding_Error : public Decoding_Error /** * Exception For Incorrect BER Taggings */ -struct BOTAN_PUBLIC_API(2,0) BER_Bad_Tag : public BER_Decoding_Error +struct BOTAN_PUBLIC_API(2,0) BER_Bad_Tag final : public BER_Decoding_Error { BER_Bad_Tag(const std::string& msg, ASN1_Tag tag); BER_Bad_Tag(const std::string& msg, ASN1_Tag tag1, ASN1_Tag tag2); diff --git a/src/lib/asn1/ber_dec.h b/src/lib/asn1/ber_dec.h index 75616ed16..ab39d985d 100644 --- a/src/lib/asn1/ber_dec.h +++ b/src/lib/asn1/ber_dec.h @@ -16,7 +16,7 @@ namespace Botan { /** * BER Decoding Object */ -class BOTAN_PUBLIC_API(2,0) BER_Decoder +class BOTAN_PUBLIC_API(2,0) BER_Decoder final { public: BER_Object get_next_object(); diff --git a/src/lib/asn1/der_enc.h b/src/lib/asn1/der_enc.h index becdd747e..7ffa824e6 100644 --- a/src/lib/asn1/der_enc.h +++ b/src/lib/asn1/der_enc.h @@ -19,7 +19,7 @@ class ASN1_Object; /** * General DER Encoding Object */ -class BOTAN_PUBLIC_API(2,0) DER_Encoder +class BOTAN_PUBLIC_API(2,0) DER_Encoder final { public: secure_vector<uint8_t> get_contents(); diff --git a/src/lib/base/init.h b/src/lib/base/init.h index 37c053b4c..ba014d8e1 100644 --- a/src/lib/base/init.h +++ b/src/lib/base/init.h @@ -19,7 +19,7 @@ namespace Botan { * case, and this class is no longer needed and kept only for backwards * compatibility. */ -class BOTAN_PUBLIC_API(2,0) BOTAN_DEPRECATED("LibraryInitializer is no longer required") LibraryInitializer +class BOTAN_PUBLIC_API(2,0) BOTAN_DEPRECATED("LibraryInitializer is no longer required") LibraryInitializer final { public: explicit LibraryInitializer(const std::string& /*ignored*/ = "") { } diff --git a/src/lib/base/key_spec.h b/src/lib/base/key_spec.h index 0a08cf27a..6db20a9b6 100644 --- a/src/lib/base/key_spec.h +++ b/src/lib/base/key_spec.h @@ -15,7 +15,7 @@ namespace Botan { /** * Represents the length requirements on an algorithm key */ -class BOTAN_PUBLIC_API(2,0) Key_Length_Specification +class BOTAN_PUBLIC_API(2,0) Key_Length_Specification final { public: /** diff --git a/src/lib/base/scan_name.h b/src/lib/base/scan_name.h index 9bc5afde8..8aa45f50f 100644 --- a/src/lib/base/scan_name.h +++ b/src/lib/base/scan_name.h @@ -18,7 +18,7 @@ namespace Botan { A class encapsulating a SCAN name (similar to JCE conventions) http://www.users.zetnet.co.uk/hopwood/crypto/scan/ */ -class BOTAN_PUBLIC_API(2,0) SCAN_Name +class BOTAN_PUBLIC_API(2,0) SCAN_Name final { public: /** diff --git a/src/lib/base/symkey.h b/src/lib/base/symkey.h index 6f933896d..a010cc466 100644 --- a/src/lib/base/symkey.h +++ b/src/lib/base/symkey.h @@ -16,7 +16,7 @@ namespace Botan { /** * Octet String */ -class BOTAN_PUBLIC_API(2,0) OctetString +class BOTAN_PUBLIC_API(2,0) OctetString final { public: /** diff --git a/src/lib/block/gost_28147/gost_28147.h b/src/lib/block/gost_28147/gost_28147.h index 735cc6161..fb2e981ac 100644 --- a/src/lib/block/gost_28147/gost_28147.h +++ b/src/lib/block/gost_28147/gost_28147.h @@ -18,7 +18,7 @@ namespace Botan { * considered a local configuration issue. Several different sets are * used. */ -class BOTAN_PUBLIC_API(2,0) GOST_28147_89_Params +class BOTAN_PUBLIC_API(2,0) GOST_28147_89_Params final { public: /** diff --git a/src/lib/block/xtea/xtea.h b/src/lib/block/xtea/xtea.h index 1a073418b..3ce0fda58 100644 --- a/src/lib/block/xtea/xtea.h +++ b/src/lib/block/xtea/xtea.h @@ -15,7 +15,7 @@ namespace Botan { /** * XTEA */ -class BOTAN_PUBLIC_API(2,0) XTEA : public Block_Cipher_Fixed_Params<8, 16> +class BOTAN_PUBLIC_API(2,0) XTEA final : public Block_Cipher_Fixed_Params<8, 16> { public: void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override; diff --git a/src/lib/compression/bzip2/bzip2.cpp b/src/lib/compression/bzip2/bzip2.cpp index 4ebf572c9..02d17ea07 100644 --- a/src/lib/compression/bzip2/bzip2.cpp +++ b/src/lib/compression/bzip2/bzip2.cpp @@ -33,7 +33,7 @@ class Bzip2_Stream : public Zlib_Style_Stream<bz_stream, char> uint32_t finish_flag() const override { return BZ_FINISH; } }; -class Bzip2_Compression_Stream : public Bzip2_Stream +class Bzip2_Compression_Stream final : public Bzip2_Stream { public: explicit Bzip2_Compression_Stream(size_t block_size) @@ -72,7 +72,7 @@ class Bzip2_Compression_Stream : public Bzip2_Stream } }; -class Bzip2_Decompression_Stream : public Bzip2_Stream +class Bzip2_Decompression_Stream final : public Bzip2_Stream { public: Bzip2_Decompression_Stream() diff --git a/src/lib/compression/compress_utils.h b/src/lib/compression/compress_utils.h index 90244a8c0..396fc47be 100644 --- a/src/lib/compression/compress_utils.h +++ b/src/lib/compression/compress_utils.h @@ -17,7 +17,7 @@ namespace Botan { /* * Allocation Size Tracking Helper for Zlib/Bzlib/LZMA */ -class Compression_Alloc_Info +class Compression_Alloc_Info final { public: template<typename T> diff --git a/src/lib/compression/lzma/lzma.cpp b/src/lib/compression/lzma/lzma.cpp index 44af1ee67..365affa91 100644 --- a/src/lib/compression/lzma/lzma.cpp +++ b/src/lib/compression/lzma/lzma.cpp @@ -52,7 +52,7 @@ class LZMA_Stream : public Zlib_Style_Stream<lzma_stream, uint8_t> uint32_t finish_flag() const override { return LZMA_FINISH; } }; -class LZMA_Compression_Stream : public LZMA_Stream +class LZMA_Compression_Stream final : public LZMA_Stream { public: explicit LZMA_Compression_Stream(size_t level) @@ -71,7 +71,7 @@ class LZMA_Compression_Stream : public LZMA_Stream } }; -class LZMA_Decompression_Stream : public LZMA_Stream +class LZMA_Decompression_Stream final : public LZMA_Stream { public: LZMA_Decompression_Stream() diff --git a/src/lib/compression/zlib/zlib.cpp b/src/lib/compression/zlib/zlib.cpp index 2bfd22928..14bc12b27 100644 --- a/src/lib/compression/zlib/zlib.cpp +++ b/src/lib/compression/zlib/zlib.cpp @@ -107,20 +107,20 @@ class Zlib_Decompression_Stream : public Zlib_Stream } }; -class Deflate_Compression_Stream : public Zlib_Compression_Stream +class Deflate_Compression_Stream final : public Zlib_Compression_Stream { public: Deflate_Compression_Stream(size_t level, int wbits) : Zlib_Compression_Stream(level, wbits, -1) {} }; -class Deflate_Decompression_Stream : public Zlib_Decompression_Stream +class Deflate_Decompression_Stream final : public Zlib_Decompression_Stream { public: explicit Deflate_Decompression_Stream(int wbits) : Zlib_Decompression_Stream(wbits, -1) {} }; -class Gzip_Compression_Stream : public Zlib_Compression_Stream +class Gzip_Compression_Stream final : public Zlib_Compression_Stream { public: Gzip_Compression_Stream(size_t level, int wbits, uint8_t os_code) : @@ -139,7 +139,7 @@ class Gzip_Compression_Stream : public Zlib_Compression_Stream ::gz_header m_header; }; -class Gzip_Decompression_Stream : public Zlib_Decompression_Stream +class Gzip_Decompression_Stream final : public Zlib_Decompression_Stream { public: explicit Gzip_Decompression_Stream(int wbits) : Zlib_Decompression_Stream(wbits, 16) {} diff --git a/src/lib/entropy/entropy_srcs.cpp b/src/lib/entropy/entropy_srcs.cpp index 76546c5da..69e593fb9 100644 --- a/src/lib/entropy/entropy_srcs.cpp +++ b/src/lib/entropy/entropy_srcs.cpp @@ -46,7 +46,7 @@ namespace Botan { namespace { -class System_RNG_EntropySource : public Entropy_Source +class System_RNG_EntropySource final : public Entropy_Source { public: size_t poll(RandomNumberGenerator& rng) override diff --git a/src/lib/entropy/proc_walk/proc_walk.cpp b/src/lib/entropy/proc_walk/proc_walk.cpp index 1fb040b1b..d780cbf73 100644 --- a/src/lib/entropy/proc_walk/proc_walk.cpp +++ b/src/lib/entropy/proc_walk/proc_walk.cpp @@ -24,7 +24,7 @@ namespace Botan { namespace { -class Directory_Walker : public File_Descriptor_Source +class Directory_Walker final : public File_Descriptor_Source { public: explicit Directory_Walker(const std::string& root) : diff --git a/src/lib/ffi/ffi_cipher.cpp b/src/lib/ffi/ffi_cipher.cpp index 72fa2eec8..23e277166 100644 --- a/src/lib/ffi/ffi_cipher.cpp +++ b/src/lib/ffi/ffi_cipher.cpp @@ -12,7 +12,7 @@ extern "C" { using namespace Botan_FFI; -struct botan_cipher_struct : public botan_struct<Botan::Cipher_Mode, 0xB4A2BF9C> +struct botan_cipher_struct final : public botan_struct<Botan::Cipher_Mode, 0xB4A2BF9C> { explicit botan_cipher_struct(Botan::Cipher_Mode* x) : botan_struct(x) {} Botan::secure_vector<uint8_t> m_buf; diff --git a/src/lib/ffi/ffi_util.h b/src/lib/ffi/ffi_util.h index 59d9a032d..7f959259c 100644 --- a/src/lib/ffi/ffi_util.h +++ b/src/lib/ffi/ffi_util.h @@ -18,7 +18,7 @@ namespace Botan_FFI { #define BOTAN_ASSERT_ARG_NON_NULL(p) \ do { if(!p) throw Botan::Invalid_Argument("Argument " #p " is null"); } while(0) -class FFI_Error : public Botan::Exception +class FFI_Error final : public Botan::Exception { public: explicit FFI_Error(const std::string& what) : Exception("FFI error", what) {} @@ -46,7 +46,7 @@ struct botan_struct }; #define BOTAN_FFI_DECLARE_STRUCT(NAME, TYPE, MAGIC) \ - struct NAME : public botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} } + struct NAME final : public botan_struct<TYPE, MAGIC> { explicit NAME(TYPE* x) : botan_struct(x) {} } // Declared in ffi.cpp int ffi_error_exception_thrown(const char* func_name, const char* exn); diff --git a/src/lib/filters/aead_filt.h b/src/lib/filters/aead_filt.h index 7927e7001..f569423a6 100644 --- a/src/lib/filters/aead_filt.h +++ b/src/lib/filters/aead_filt.h @@ -16,7 +16,7 @@ namespace Botan { /** * Filter interface for AEAD Modes */ -class AEAD_Filter : public Cipher_Mode_Filter +class AEAD_Filter final : public Cipher_Mode_Filter { public: AEAD_Filter(AEAD_Mode* aead) : Cipher_Mode_Filter(aead) {} diff --git a/src/lib/filters/basefilt.h b/src/lib/filters/basefilt.h index 1716c6aaf..40ce0ec6e 100644 --- a/src/lib/filters/basefilt.h +++ b/src/lib/filters/basefilt.h @@ -33,7 +33,7 @@ struct BOTAN_PUBLIC_API(2,0) BitBucket final : public Filter * through all the Filters contained in the Chain. */ -class BOTAN_PUBLIC_API(2,0) Chain : public Fanout_Filter +class BOTAN_PUBLIC_API(2,0) Chain final : public Fanout_Filter { public: void write(const uint8_t input[], size_t length) override { send(input, length); } @@ -88,7 +88,7 @@ class BOTAN_PUBLIC_API(2,0) Fork : public Fanout_Filter * threads, the class itself is NOT thread-safe. This is meant as a drop- * in replacement for Fork where performance gains are possible. */ -class BOTAN_PUBLIC_API(2,0) Threaded_Fork : public Fork +class BOTAN_PUBLIC_API(2,0) Threaded_Fork final : public Fork { public: std::string name() const override; diff --git a/src/lib/filters/cipher_filter.h b/src/lib/filters/cipher_filter.h index d26585723..94cfa71df 100644 --- a/src/lib/filters/cipher_filter.h +++ b/src/lib/filters/cipher_filter.h @@ -17,7 +17,7 @@ namespace Botan { /** * Filter interface for cipher modes */ -class BOTAN_PUBLIC_API(2,0) Cipher_Mode_Filter : public Keyed_Filter, +class BOTAN_PUBLIC_API(2,0) Cipher_Mode_Filter final : public Keyed_Filter, private Buffered_Filter { public: diff --git a/src/lib/filters/comp_filter.h b/src/lib/filters/comp_filter.h index f9d2a7d1d..d9cc00b68 100644 --- a/src/lib/filters/comp_filter.h +++ b/src/lib/filters/comp_filter.h @@ -20,7 +20,7 @@ class Decompression_Algorithm; /** * Filter interface for compression */ -class BOTAN_PUBLIC_API(2,0) Compression_Filter : public Filter +class BOTAN_PUBLIC_API(2,0) Compression_Filter final : public Filter { public: void start_msg() override; @@ -45,7 +45,7 @@ class BOTAN_PUBLIC_API(2,0) Compression_Filter : public Filter /** * Filter interface for decompression */ -class BOTAN_PUBLIC_API(2,0) Decompression_Filter : public Filter +class BOTAN_PUBLIC_API(2,0) Decompression_Filter final : public Filter { public: void start_msg() override; diff --git a/src/lib/filters/data_snk.h b/src/lib/filters/data_snk.h index 4134ccbe5..49484b1c1 100644 --- a/src/lib/filters/data_snk.h +++ b/src/lib/filters/data_snk.h @@ -32,7 +32,7 @@ class BOTAN_PUBLIC_API(2,0) DataSink : public Filter /** * This class represents a data sink which writes its output to a stream. */ -class BOTAN_PUBLIC_API(2,0) DataSink_Stream : public DataSink +class BOTAN_PUBLIC_API(2,0) DataSink_Stream final : public DataSink { public: /** diff --git a/src/lib/filters/filters.h b/src/lib/filters/filters.h index 4f0e836ba..690c21214 100644 --- a/src/lib/filters/filters.h +++ b/src/lib/filters/filters.h @@ -28,7 +28,7 @@ namespace Botan { /** * Stream Cipher Filter */ -class BOTAN_PUBLIC_API(2,0) StreamCipher_Filter : public Keyed_Filter +class BOTAN_PUBLIC_API(2,0) StreamCipher_Filter final : public Keyed_Filter { public: @@ -94,7 +94,7 @@ class BOTAN_PUBLIC_API(2,0) StreamCipher_Filter : public Keyed_Filter /** * Hash Filter. */ -class BOTAN_PUBLIC_API(2,0) Hash_Filter : public Filter +class BOTAN_PUBLIC_API(2,0) Hash_Filter final : public Filter { public: void write(const uint8_t input[], size_t len) override { m_hash->update(input, len); } @@ -131,7 +131,7 @@ class BOTAN_PUBLIC_API(2,0) Hash_Filter : public Filter /** * MessageAuthenticationCode Filter. */ -class BOTAN_PUBLIC_API(2,0) MAC_Filter : public Keyed_Filter +class BOTAN_PUBLIC_API(2,0) MAC_Filter final : public Keyed_Filter { public: void write(const uint8_t input[], size_t len) override { m_mac->update(input, len); } diff --git a/src/lib/filters/out_buf.h b/src/lib/filters/out_buf.h index d933df223..eab19fb3b 100644 --- a/src/lib/filters/out_buf.h +++ b/src/lib/filters/out_buf.h @@ -18,7 +18,7 @@ namespace Botan { /** * Container of output buffers for Pipe */ -class Output_Buffers +class Output_Buffers final { public: size_t read(uint8_t[], size_t, Pipe::message_id); diff --git a/src/lib/filters/pipe.cpp b/src/lib/filters/pipe.cpp index 3c901d0b7..bd6969f30 100644 --- a/src/lib/filters/pipe.cpp +++ b/src/lib/filters/pipe.cpp @@ -16,7 +16,7 @@ namespace { /* * A Filter that does nothing */ -class Null_Filter : public Filter +class Null_Filter final : public Filter { public: void write(const uint8_t input[], size_t length) override diff --git a/src/lib/filters/pipe.h b/src/lib/filters/pipe.h index 24b536bf7..74a6f33d3 100644 --- a/src/lib/filters/pipe.h +++ b/src/lib/filters/pipe.h @@ -37,7 +37,7 @@ class BOTAN_PUBLIC_API(2,0) Pipe final : public DataSource * Exception if you use an invalid message as an argument to * read, remaining, etc */ - struct BOTAN_PUBLIC_API(2,0) Invalid_Message_Number : public Invalid_Argument + struct BOTAN_PUBLIC_API(2,0) Invalid_Message_Number final : public Invalid_Argument { /** * @param where the error occurred diff --git a/src/lib/filters/secqueue.cpp b/src/lib/filters/secqueue.cpp index b2fc444af..feaa26b4c 100644 --- a/src/lib/filters/secqueue.cpp +++ b/src/lib/filters/secqueue.cpp @@ -14,7 +14,7 @@ namespace Botan { /** * A node in a SecureQueue */ -class SecureQueueNode +class SecureQueueNode final { public: SecureQueueNode() : m_buffer(DEFAULT_BUFFERSIZE) diff --git a/src/lib/filters/secqueue.h b/src/lib/filters/secqueue.h index 2a999a04b..00616f5cf 100644 --- a/src/lib/filters/secqueue.h +++ b/src/lib/filters/secqueue.h @@ -17,7 +17,7 @@ namespace Botan { /** * A queue that knows how to zeroize itself */ -class BOTAN_PUBLIC_API(2,0) SecureQueue : public Fanout_Filter, public DataSource +class BOTAN_PUBLIC_API(2,0) SecureQueue final : public Fanout_Filter, public DataSource { public: std::string name() const override { return "Queue"; } diff --git a/src/lib/hash/shake/shake.h b/src/lib/hash/shake/shake.h index b41baa492..5ec35901f 100644 --- a/src/lib/hash/shake/shake.h +++ b/src/lib/hash/shake/shake.h @@ -17,7 +17,7 @@ namespace Botan { /** * SHAKE-128 */ -class BOTAN_PUBLIC_API(2,0) SHAKE_128 : public HashFunction +class BOTAN_PUBLIC_API(2,0) SHAKE_128 final : public HashFunction { public: @@ -49,7 +49,7 @@ class BOTAN_PUBLIC_API(2,0) SHAKE_128 : public HashFunction /** * SHAKE-256 */ -class BOTAN_PUBLIC_API(2,0) SHAKE_256 : public HashFunction +class BOTAN_PUBLIC_API(2,0) SHAKE_256 final : public HashFunction { public: diff --git a/src/lib/hash/streebog/streebog.h b/src/lib/hash/streebog/streebog.h index d18ac02fc..5e83efb39 100644 --- a/src/lib/hash/streebog/streebog.h +++ b/src/lib/hash/streebog/streebog.h @@ -16,7 +16,7 @@ namespace Botan { * Streebog (GOST R 34.11-2012) * RFC 6986 */ -class BOTAN_PUBLIC_API(2,2) Streebog: public HashFunction +class BOTAN_PUBLIC_API(2,2) Streebog : public HashFunction { public: size_t output_length() const override { return m_output_bits / 8; } diff --git a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h index e49f41d22..fcd465436 100644 --- a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h +++ b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h @@ -16,7 +16,7 @@ namespace Botan { /** * KDF1, from ISO 18033-2 */ -class BOTAN_PUBLIC_API(2,0) KDF1_18033 : public KDF +class BOTAN_PUBLIC_API(2,0) KDF1_18033 final : public KDF { public: std::string name() const override { return "KDF1-18033(" + m_hash->name() + ")"; } diff --git a/src/lib/kdf/sp800_108/sp800_108.h b/src/lib/kdf/sp800_108/sp800_108.h index 6bf488ac0..d74c876f7 100644 --- a/src/lib/kdf/sp800_108/sp800_108.h +++ b/src/lib/kdf/sp800_108/sp800_108.h @@ -16,7 +16,7 @@ namespace Botan { /** * NIST SP 800-108 KDF in Counter Mode (5.1) */ -class BOTAN_PUBLIC_API(2,0) SP800_108_Counter : public KDF +class BOTAN_PUBLIC_API(2,0) SP800_108_Counter final : public KDF { public: std::string name() const override { return "SP800-108-Counter(" + m_prf->name() + ")"; } @@ -56,7 +56,7 @@ class BOTAN_PUBLIC_API(2,0) SP800_108_Counter : public KDF /** * NIST SP 800-108 KDF in Feedback Mode (5.2) */ -class BOTAN_PUBLIC_API(2,0) SP800_108_Feedback : public KDF +class BOTAN_PUBLIC_API(2,0) SP800_108_Feedback final : public KDF { public: std::string name() const override { return "SP800-108-Feedback(" + m_prf->name() + ")"; } @@ -93,7 +93,7 @@ class BOTAN_PUBLIC_API(2,0) SP800_108_Feedback : public KDF /** * NIST SP 800-108 KDF in Double Pipeline Mode (5.3) */ -class BOTAN_PUBLIC_API(2,0) SP800_108_Pipeline : public KDF +class BOTAN_PUBLIC_API(2,0) SP800_108_Pipeline final : public KDF { public: std::string name() const override { return "SP800-108-Pipeline(" + m_prf->name() + ")"; } diff --git a/src/lib/kdf/sp800_56c/sp800_56c.h b/src/lib/kdf/sp800_56c/sp800_56c.h index 891933296..a6db91658 100644 --- a/src/lib/kdf/sp800_56c/sp800_56c.h +++ b/src/lib/kdf/sp800_56c/sp800_56c.h @@ -16,7 +16,7 @@ namespace Botan { /** * NIST SP 800-56C KDF */ -class BOTAN_PUBLIC_API(2,0) SP800_56C : public KDF +class BOTAN_PUBLIC_API(2,0) SP800_56C final : public KDF { public: std::string name() const override { return "SP800-56C(" + m_prf->name() + ")"; } diff --git a/src/lib/mac/gmac/gmac.h b/src/lib/mac/gmac/gmac.h index 6d1c6e1fe..eb14b8e11 100644 --- a/src/lib/mac/gmac/gmac.h +++ b/src/lib/mac/gmac/gmac.h @@ -17,7 +17,7 @@ namespace Botan { /** * GMAC */ -class BOTAN_PUBLIC_API(2,0) GMAC : public MessageAuthenticationCode, public GHASH +class BOTAN_PUBLIC_API(2,0) GMAC final : public MessageAuthenticationCode, public GHASH { public: void clear() override; diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h index 0b116f3cc..9455a869b 100644 --- a/src/lib/math/bigint/bigint.h +++ b/src/lib/math/bigint/bigint.h @@ -22,7 +22,7 @@ class RandomNumberGenerator; /** * Arbitrary precision integer */ -class BOTAN_PUBLIC_API(2,0) BigInt +class BOTAN_PUBLIC_API(2,0) BigInt final { public: /** @@ -38,7 +38,7 @@ class BOTAN_PUBLIC_API(2,0) BigInt /** * DivideByZero Exception */ - struct BOTAN_PUBLIC_API(2,0) DivideByZero : public Exception + struct BOTAN_PUBLIC_API(2,0) DivideByZero final : public Exception { DivideByZero() : Exception("BigInt divide by zero") {} }; /** diff --git a/src/lib/math/ec_gfp/curve_gfp.h b/src/lib/math/ec_gfp/curve_gfp.h index 805359ba9..a0d9bc1c7 100644 --- a/src/lib/math/ec_gfp/curve_gfp.h +++ b/src/lib/math/ec_gfp/curve_gfp.h @@ -50,7 +50,7 @@ class BOTAN_UNSTABLE_API CurveGFp_Repr /** * This class represents an elliptic curve over GF(p) */ -class BOTAN_PUBLIC_API(2,0) CurveGFp +class BOTAN_PUBLIC_API(2,0) CurveGFp final { public: diff --git a/src/lib/math/ec_gfp/point_gfp.h b/src/lib/math/ec_gfp/point_gfp.h index 125fd6ccf..1d36ad2f4 100644 --- a/src/lib/math/ec_gfp/point_gfp.h +++ b/src/lib/math/ec_gfp/point_gfp.h @@ -19,7 +19,7 @@ namespace Botan { * Exception thrown if you try to convert a zero point to an affine * coordinate */ -struct BOTAN_PUBLIC_API(2,0) Illegal_Transformation : public Exception +struct BOTAN_PUBLIC_API(2,0) Illegal_Transformation final : public Exception { explicit Illegal_Transformation(const std::string& err = "Requested transformation is not possible") : @@ -29,7 +29,7 @@ struct BOTAN_PUBLIC_API(2,0) Illegal_Transformation : public Exception /** * Exception thrown if some form of illegal point is decoded */ -struct BOTAN_PUBLIC_API(2,0) Illegal_Point : public Exception +struct BOTAN_PUBLIC_API(2,0) Illegal_Point final : public Exception { explicit Illegal_Point(const std::string& err = "Malformed ECP point detected") : Exception(err) {} @@ -38,7 +38,7 @@ struct BOTAN_PUBLIC_API(2,0) Illegal_Point : public Exception /** * This class represents one point on a curve of GF(p) */ -class BOTAN_PUBLIC_API(2,0) PointGFp +class BOTAN_PUBLIC_API(2,0) PointGFp final { public: enum Compression_Type { @@ -286,7 +286,7 @@ PointGFp OS2ECP(const std::vector<uint8_t, Alloc>& data, const CurveGFp& curve) /** */ -class BOTAN_PUBLIC_API(2,0) Blinded_Point_Multiply +class BOTAN_PUBLIC_API(2,0) Blinded_Point_Multiply final { public: Blinded_Point_Multiply(const PointGFp& base, const BigInt& order, size_t h = 0); diff --git a/src/lib/math/numbertheory/def_powm.h b/src/lib/math/numbertheory/def_powm.h index f284739e4..826ffb49f 100644 --- a/src/lib/math/numbertheory/def_powm.h +++ b/src/lib/math/numbertheory/def_powm.h @@ -17,7 +17,7 @@ namespace Botan { /** * Fixed Window Exponentiator */ -class Fixed_Window_Exponentiator : public Modular_Exponentiator +class Fixed_Window_Exponentiator final : public Modular_Exponentiator { public: void set_exponent(const BigInt&) override; @@ -39,7 +39,7 @@ class Fixed_Window_Exponentiator : public Modular_Exponentiator /** * Montgomery Exponentiator */ -class Montgomery_Exponentiator : public Modular_Exponentiator +class Montgomery_Exponentiator final : public Modular_Exponentiator { public: void set_exponent(const BigInt&) override; diff --git a/src/lib/math/numbertheory/pow_mod.h b/src/lib/math/numbertheory/pow_mod.h index 0739b0736..7613c2ddf 100644 --- a/src/lib/math/numbertheory/pow_mod.h +++ b/src/lib/math/numbertheory/pow_mod.h @@ -101,7 +101,7 @@ class BOTAN_PUBLIC_API(2,0) Power_Mod /** * Fixed Exponent Modular Exponentiator Proxy */ -class BOTAN_PUBLIC_API(2,0) Fixed_Exponent_Power_Mod : public Power_Mod +class BOTAN_PUBLIC_API(2,0) Fixed_Exponent_Power_Mod final : public Power_Mod { public: BigInt operator()(const BigInt& b) const @@ -117,7 +117,7 @@ class BOTAN_PUBLIC_API(2,0) Fixed_Exponent_Power_Mod : public Power_Mod /** * Fixed Base Modular Exponentiator Proxy */ -class BOTAN_PUBLIC_API(2,0) Fixed_Base_Power_Mod : public Power_Mod +class BOTAN_PUBLIC_API(2,0) Fixed_Base_Power_Mod final : public Power_Mod { public: BigInt operator()(const BigInt& e) const diff --git a/src/lib/misc/fpe_fe1/fpe_fe1.cpp b/src/lib/misc/fpe_fe1/fpe_fe1.cpp index 72e154374..41a0cc606 100644 --- a/src/lib/misc/fpe_fe1/fpe_fe1.cpp +++ b/src/lib/misc/fpe_fe1/fpe_fe1.cpp @@ -75,7 +75,7 @@ size_t rounds(const BigInt& a, const BigInt& b) /* * A simple round function based on HMAC(SHA-256) */ -class FPE_Encryptor +class FPE_Encryptor final { public: FPE_Encryptor(const SymmetricKey& key, diff --git a/src/lib/misc/hotp/hotp.h b/src/lib/misc/hotp/hotp.h index 8d10357b9..481e404eb 100644 --- a/src/lib/misc/hotp/hotp.h +++ b/src/lib/misc/hotp/hotp.h @@ -15,7 +15,7 @@ namespace Botan { /** * HOTP one time passwords (RFC 4226) */ -class BOTAN_PUBLIC_API(2,2) HOTP +class BOTAN_PUBLIC_API(2,2) HOTP final { public: /** diff --git a/src/lib/misc/hotp/totp.h b/src/lib/misc/hotp/totp.h index 55ff93a5e..4ef74d363 100644 --- a/src/lib/misc/hotp/totp.h +++ b/src/lib/misc/hotp/totp.h @@ -15,7 +15,7 @@ namespace Botan { /** * TOTP (time based) one time passwords (RFC 6238) */ -class BOTAN_PUBLIC_API(2,2) TOTP +class BOTAN_PUBLIC_API(2,2) TOTP final { public: /** diff --git a/src/lib/misc/srp6/srp6.h b/src/lib/misc/srp6/srp6.h index 464b67252..ad880946a 100644 --- a/src/lib/misc/srp6/srp6.h +++ b/src/lib/misc/srp6/srp6.h @@ -63,7 +63,7 @@ std::string BOTAN_PUBLIC_API(2,0) srp6_group_identifier(const BigInt& N, const B /** * Represents a SRP-6a server session */ -class BOTAN_PUBLIC_API(2,0) SRP6_Server_Session +class BOTAN_PUBLIC_API(2,0) SRP6_Server_Session final { public: /** diff --git a/src/lib/misc/tss/tss.h b/src/lib/misc/tss/tss.h index d1fd15f24..4a5a5571d 100644 --- a/src/lib/misc/tss/tss.h +++ b/src/lib/misc/tss/tss.h @@ -18,7 +18,7 @@ class RandomNumberGenerator; /** * A split secret, using the format from draft-mcgrew-tss-03 */ -class BOTAN_PUBLIC_API(2,0) RTSS_Share +class BOTAN_PUBLIC_API(2,0) RTSS_Share final { public: /** diff --git a/src/lib/modes/aead/ocb/ocb.cpp b/src/lib/modes/aead/ocb/ocb.cpp index 6644b4935..e885eb5bc 100644 --- a/src/lib/modes/aead/ocb/ocb.cpp +++ b/src/lib/modes/aead/ocb/ocb.cpp @@ -14,7 +14,7 @@ namespace Botan { // Has to be in Botan namespace so unique_ptr can reference it -class L_computer +class L_computer final { public: explicit L_computer(const BlockCipher& cipher) diff --git a/src/lib/modes/stream_mode.h b/src/lib/modes/stream_mode.h index 003a396fd..1f0fb29d2 100644 --- a/src/lib/modes/stream_mode.h +++ b/src/lib/modes/stream_mode.h @@ -13,7 +13,7 @@ namespace Botan { -class BOTAN_PUBLIC_API(2,0) Stream_Cipher_Mode : public Cipher_Mode +class BOTAN_PUBLIC_API(2,0) Stream_Cipher_Mode final : public Cipher_Mode { public: /** diff --git a/src/lib/pk_pad/emsa1/emsa1.h b/src/lib/pk_pad/emsa1/emsa1.h index 1d682f7f1..98c040b2b 100644 --- a/src/lib/pk_pad/emsa1/emsa1.h +++ b/src/lib/pk_pad/emsa1/emsa1.h @@ -17,7 +17,7 @@ namespace Botan { * EMSA1 from IEEE 1363 * Essentially, sign the hash directly */ -class BOTAN_PUBLIC_API(2,0) EMSA1 : public EMSA +class BOTAN_PUBLIC_API(2,0) EMSA1 final : public EMSA { public: /** diff --git a/src/lib/prov/bearssl/bearssl.h b/src/lib/prov/bearssl/bearssl.h index f4def013b..e6d77fcfa 100644 --- a/src/lib/prov/bearssl/bearssl.h +++ b/src/lib/prov/bearssl/bearssl.h @@ -19,7 +19,7 @@ namespace Botan { class HashFunction; -class BearSSL_Error : public Exception +class BearSSL_Error final : public Exception { public: BearSSL_Error(const std::string& what) : diff --git a/src/lib/prov/bearssl/bearssl_ec.cpp b/src/lib/prov/bearssl/bearssl_ec.cpp index fe661f357..7a0808c47 100644 --- a/src/lib/prov/bearssl/bearssl_ec.cpp +++ b/src/lib/prov/bearssl/bearssl_ec.cpp @@ -73,7 +73,7 @@ const br_hash_class *BearSSL_hash_class_for(const std::string& emsa) namespace { -class BearSSL_ECDSA_Verification_Operation : public PK_Ops::Verification +class BearSSL_ECDSA_Verification_Operation final : public PK_Ops::Verification { public: BearSSL_ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa, const std::string& emsa) : @@ -132,7 +132,7 @@ class BearSSL_ECDSA_Verification_Operation : public PK_Ops::Verification size_t m_order_bits; }; -class BearSSL_ECDSA_Signing_Operation : public PK_Ops::Signature +class BearSSL_ECDSA_Signing_Operation final : public PK_Ops::Signature { public: BearSSL_ECDSA_Signing_Operation(const ECDSA_PrivateKey& ecdsa, const std::string& emsa) : diff --git a/src/lib/prov/bearssl/bearssl_hash.cpp b/src/lib/prov/bearssl/bearssl_hash.cpp index 9620d6d70..a0eb845f1 100644 --- a/src/lib/prov/bearssl/bearssl_hash.cpp +++ b/src/lib/prov/bearssl/bearssl_hash.cpp @@ -18,7 +18,7 @@ namespace Botan { namespace { -class BearSSL_HashFunction : public HashFunction +class BearSSL_HashFunction final : public HashFunction { public: void clear() override diff --git a/src/lib/prov/openssl/openssl.h b/src/lib/prov/openssl/openssl.h index 5a81f878d..89bd0b1a7 100644 --- a/src/lib/prov/openssl/openssl.h +++ b/src/lib/prov/openssl/openssl.h @@ -30,7 +30,7 @@ class HashFunction; class RandomNumberGenerator; enum Cipher_Dir : int; -class OpenSSL_Error : public Exception +class OpenSSL_Error final : public Exception { public: OpenSSL_Error(const std::string& what) : diff --git a/src/lib/prov/openssl/openssl_block.cpp b/src/lib/prov/openssl/openssl_block.cpp index 122678b6d..83e0e960d 100644 --- a/src/lib/prov/openssl/openssl_block.cpp +++ b/src/lib/prov/openssl/openssl_block.cpp @@ -13,7 +13,7 @@ namespace Botan { namespace { -class OpenSSL_BlockCipher : public BlockCipher +class OpenSSL_BlockCipher final : public BlockCipher { public: OpenSSL_BlockCipher(const std::string& name, diff --git a/src/lib/prov/openssl/openssl_ec.cpp b/src/lib/prov/openssl/openssl_ec.cpp index 4d26661ac..66c3d286b 100644 --- a/src/lib/prov/openssl/openssl_ec.cpp +++ b/src/lib/prov/openssl/openssl_ec.cpp @@ -132,7 +132,7 @@ int OpenSSL_EC_nid_for(const OID& oid) namespace { -class OpenSSL_ECDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class OpenSSL_ECDSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: OpenSSL_ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa, const std::string& emsa, int nid) : @@ -194,7 +194,7 @@ class OpenSSL_ECDSA_Verification_Operation : public PK_Ops::Verification_with_EM size_t m_order_bits = 0; }; -class OpenSSL_ECDSA_Signing_Operation : public PK_Ops::Signature_with_EMSA +class OpenSSL_ECDSA_Signing_Operation final : public PK_Ops::Signature_with_EMSA { public: OpenSSL_ECDSA_Signing_Operation(const ECDSA_PrivateKey& ecdsa, const std::string& emsa) : @@ -276,7 +276,7 @@ make_openssl_ecdsa_sig_op(const ECDSA_PrivateKey& key, const std::string& params namespace { -class OpenSSL_ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF +class OpenSSL_ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF { public: diff --git a/src/lib/prov/openssl/openssl_hash.cpp b/src/lib/prov/openssl/openssl_hash.cpp index 16b1a79fe..1b7bbb19b 100644 --- a/src/lib/prov/openssl/openssl_hash.cpp +++ b/src/lib/prov/openssl/openssl_hash.cpp @@ -14,7 +14,7 @@ namespace Botan { namespace { -class OpenSSL_HashFunction : public HashFunction +class OpenSSL_HashFunction final : public HashFunction { public: void clear() override diff --git a/src/lib/prov/openssl/openssl_mode.cpp b/src/lib/prov/openssl/openssl_mode.cpp index e056dda16..9580bc9c5 100644 --- a/src/lib/prov/openssl/openssl_mode.cpp +++ b/src/lib/prov/openssl/openssl_mode.cpp @@ -15,7 +15,7 @@ namespace Botan { namespace { -class OpenSSL_Cipher_Mode : public Cipher_Mode +class OpenSSL_Cipher_Mode final : public Cipher_Mode { public: OpenSSL_Cipher_Mode(const std::string& name, diff --git a/src/lib/prov/openssl/openssl_rc4.cpp b/src/lib/prov/openssl/openssl_rc4.cpp index 9cca7fdd1..5fb2a68f5 100644 --- a/src/lib/prov/openssl/openssl_rc4.cpp +++ b/src/lib/prov/openssl/openssl_rc4.cpp @@ -18,7 +18,7 @@ namespace Botan { namespace { -class OpenSSL_RC4 : public StreamCipher +class OpenSSL_RC4 final : public StreamCipher { public: void clear() override { clear_mem(&m_rc4, 1); } diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp index b1c73d851..a7ba6e3e9 100644 --- a/src/lib/prov/openssl/openssl_rsa.cpp +++ b/src/lib/prov/openssl/openssl_rsa.cpp @@ -39,7 +39,7 @@ std::pair<int, size_t> get_openssl_enc_pad(const std::string& eme) throw Lookup_Error("OpenSSL RSA does not support EME " + eme); } -class OpenSSL_RSA_Encryption_Operation : public PK_Ops::Encryption +class OpenSSL_RSA_Encryption_Operation final : public PK_Ops::Encryption { public: @@ -94,7 +94,7 @@ class OpenSSL_RSA_Encryption_Operation : public PK_Ops::Encryption int m_padding = 0; }; -class OpenSSL_RSA_Decryption_Operation : public PK_Ops::Decryption +class OpenSSL_RSA_Decryption_Operation final : public PK_Ops::Decryption { public: @@ -137,7 +137,7 @@ class OpenSSL_RSA_Decryption_Operation : public PK_Ops::Decryption int m_padding = 0; }; -class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class OpenSSL_RSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: @@ -188,7 +188,7 @@ class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA std::unique_ptr<RSA, std::function<void (RSA*)>> m_openssl_rsa; }; -class OpenSSL_RSA_Signing_Operation : public PK_Ops::Signature_with_EMSA +class OpenSSL_RSA_Signing_Operation final : public PK_Ops::Signature_with_EMSA { public: diff --git a/src/lib/prov/pkcs11/p11.h b/src/lib/prov/pkcs11/p11.h index 520602b6d..50294d214 100644 --- a/src/lib/prov/pkcs11/p11.h +++ b/src/lib/prov/pkcs11/p11.h @@ -2830,7 +2830,7 @@ class PKCS11_Error : public Exception } }; -class PKCS11_ReturnError : public PKCS11_Error +class PKCS11_ReturnError final : public PKCS11_Error { public: explicit PKCS11_ReturnError(ReturnValue return_val) : diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp index 5ec5c063d..d7b0fae5c 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.cpp +++ b/src/lib/prov/pkcs11/p11_ecdh.cpp @@ -38,7 +38,7 @@ secure_vector<uint8_t> PKCS11_ECDH_PrivateKey::private_key_bits() const } namespace { -class PKCS11_ECDH_KA_Operation : public PK_Ops::Key_Agreement +class PKCS11_ECDH_KA_Operation final : public PK_Ops::Key_Agreement { public: PKCS11_ECDH_KA_Operation(const PKCS11_EC_PrivateKey& key, const std::string& params) diff --git a/src/lib/prov/pkcs11/p11_ecdh.h b/src/lib/prov/pkcs11/p11_ecdh.h index d95966a97..203e5ea5f 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.h +++ b/src/lib/prov/pkcs11/p11_ecdh.h @@ -24,7 +24,7 @@ namespace PKCS11 { class Session; /// Represents a PKCS#11 ECDH public key -class BOTAN_PUBLIC_API(2,0) PKCS11_ECDH_PublicKey final : public PKCS11_EC_PublicKey +class BOTAN_PUBLIC_API(2,0) PKCS11_ECDH_PublicKey : public PKCS11_EC_PublicKey { public: /** diff --git a/src/lib/prov/pkcs11/p11_ecdsa.cpp b/src/lib/prov/pkcs11/p11_ecdsa.cpp index 5be66caaf..a93e761b1 100644 --- a/src/lib/prov/pkcs11/p11_ecdsa.cpp +++ b/src/lib/prov/pkcs11/p11_ecdsa.cpp @@ -54,7 +54,7 @@ secure_vector<uint8_t> PKCS11_ECDSA_PrivateKey::private_key_bits() const namespace { -class PKCS11_ECDSA_Signature_Operation : public PK_Ops::Signature +class PKCS11_ECDSA_Signature_Operation final : public PK_Ops::Signature { public: PKCS11_ECDSA_Signature_Operation(const PKCS11_EC_PrivateKey& key, const std::string& emsa) @@ -109,7 +109,7 @@ class PKCS11_ECDSA_Signature_Operation : public PK_Ops::Signature }; -class PKCS11_ECDSA_Verification_Operation : public PK_Ops::Verification +class PKCS11_ECDSA_Verification_Operation final : public PK_Ops::Verification { public: PKCS11_ECDSA_Verification_Operation(const PKCS11_EC_PublicKey& key, const std::string& emsa) diff --git a/src/lib/prov/pkcs11/p11_mechanism.cpp b/src/lib/prov/pkcs11/p11_mechanism.cpp index 1621317cc..01c38ded5 100644 --- a/src/lib/prov/pkcs11/p11_mechanism.cpp +++ b/src/lib/prov/pkcs11/p11_mechanism.cpp @@ -44,7 +44,7 @@ struct MechanismData MechanismType type; }; -struct RSA_SignMechanism : public MechanismData +struct RSA_SignMechanism final : public MechanismData { explicit RSA_SignMechanism(MechanismType _type) : MechanismData(_type), hash(static_cast<MechanismType>(0)), mgf(static_cast<MGF>(0)), salt_size(0) @@ -97,7 +97,7 @@ static std::map<std::string, RSA_SignMechanism> SignMechanisms = { "ISO9796", RSA_SignMechanism(MechanismType::Rsa9796) } }; -struct RSA_CryptMechanism : public MechanismData +struct RSA_CryptMechanism final : public MechanismData { RSA_CryptMechanism(MechanismType _type, size_t _padding_size, MechanismType _hash, MGF _mgf) : MechanismData(_type), hash(_hash), mgf(_mgf), padding_size(_padding_size) diff --git a/src/lib/prov/pkcs11/p11_object.h b/src/lib/prov/pkcs11/p11_object.h index 9f9674949..b49f8e473 100644 --- a/src/lib/prov/pkcs11/p11_object.h +++ b/src/lib/prov/pkcs11/p11_object.h @@ -237,7 +237,7 @@ class BOTAN_PUBLIC_API(2,0) StorageObjectProperties : public ObjectProperties }; /// Common attributes of all data objects -class BOTAN_PUBLIC_API(2,0) DataObjectProperties : public StorageObjectProperties +class BOTAN_PUBLIC_API(2,0) DataObjectProperties final : public StorageObjectProperties { public: DataObjectProperties(); @@ -514,7 +514,7 @@ class BOTAN_PUBLIC_API(2,0) PrivateKeyProperties : public KeyProperties }; /// Common attributes of all secret (symmetric) keys -class BOTAN_PUBLIC_API(2,0) SecretKeyProperties : public KeyProperties +class BOTAN_PUBLIC_API(2,0) SecretKeyProperties final : public KeyProperties { public: /// @param key_type type of key @@ -619,7 +619,7 @@ class BOTAN_PUBLIC_API(2,0) SecretKeyProperties : public KeyProperties }; /// Common attributes of domain parameter -class BOTAN_PUBLIC_API(2,0) DomainParameterProperties : public StorageObjectProperties +class BOTAN_PUBLIC_API(2,0) DomainParameterProperties final : public StorageObjectProperties { public: /// @param key_type type of key the domain parameters can be used to generate diff --git a/src/lib/prov/pkcs11/p11_rsa.cpp b/src/lib/prov/pkcs11/p11_rsa.cpp index 8332a945f..e81bda568 100644 --- a/src/lib/prov/pkcs11/p11_rsa.cpp +++ b/src/lib/prov/pkcs11/p11_rsa.cpp @@ -164,7 +164,7 @@ class PKCS11_RSA_Decryption_Operation final : public PK_Ops::Decryption // note: multiple-part encryption operations (with C_EncryptUpdate/C_EncryptFinal) // are not supported (PK_Ops::Encryption does not provide an `update` method) -class PKCS11_RSA_Encryption_Operation : public PK_Ops::Encryption +class PKCS11_RSA_Encryption_Operation final : public PK_Ops::Encryption { public: @@ -195,7 +195,7 @@ class PKCS11_RSA_Encryption_Operation : public PK_Ops::Encryption }; -class PKCS11_RSA_Signature_Operation : public PK_Ops::Signature +class PKCS11_RSA_Signature_Operation final : public PK_Ops::Signature { public: @@ -250,7 +250,7 @@ class PKCS11_RSA_Signature_Operation : public PK_Ops::Signature }; -class PKCS11_RSA_Verification_Operation : public PK_Ops::Verification +class PKCS11_RSA_Verification_Operation final : public PK_Ops::Verification { public: diff --git a/src/lib/prov/pkcs11/p11_rsa.h b/src/lib/prov/pkcs11/p11_rsa.h index ba35db240..a4f3a04d7 100644 --- a/src/lib/prov/pkcs11/p11_rsa.h +++ b/src/lib/prov/pkcs11/p11_rsa.h @@ -62,7 +62,7 @@ class BOTAN_PUBLIC_API(2,0) RSA_PublicKeyImportProperties final : public PublicK }; /// Represents a PKCS#11 RSA public key -class BOTAN_PUBLIC_API(2,0) PKCS11_RSA_PublicKey final : public RSA_PublicKey, +class BOTAN_PUBLIC_API(2,0) PKCS11_RSA_PublicKey : public RSA_PublicKey, public Object { public: diff --git a/src/lib/prov/tpm/tpm.cpp b/src/lib/prov/tpm/tpm.cpp index 8e3fce968..ccc6e9958 100644 --- a/src/lib/prov/tpm/tpm.cpp +++ b/src/lib/prov/tpm/tpm.cpp @@ -383,7 +383,7 @@ bool TPM_PrivateKey::check_key(RandomNumberGenerator&, bool) const namespace { -class TPM_Signing_Operation : public PK_Ops::Signature +class TPM_Signing_Operation final : public PK_Ops::Signature { public: TPM_Signing_Operation(const TPM_PrivateKey& key, diff --git a/src/lib/prov/tpm/tpm.h b/src/lib/prov/tpm/tpm.h index 2e67a4a5b..fb4f027d5 100644 --- a/src/lib/prov/tpm/tpm.h +++ b/src/lib/prov/tpm/tpm.h @@ -14,13 +14,14 @@ #include <botan/bigint.h> #include <botan/rng.h> #include <botan/uuid.h> +#include <functional> //TODO remove this #include <tss/tspi.h> namespace Botan { -class TPM_Error : public Exception +class TPM_Error final : public Exception { public: TPM_Error(const std::string& err) : Exception(err) {} @@ -36,7 +37,7 @@ class TPM_Error : public Exception * * TODO: handling owner password? */ -class BOTAN_PUBLIC_API(2,0) TPM_Context +class BOTAN_PUBLIC_API(2,0) TPM_Context final { public: /** @@ -72,7 +73,7 @@ class BOTAN_PUBLIC_API(2,0) TPM_Context TSS_HTPM m_tpm; }; -class BOTAN_PUBLIC_API(2,0) TPM_RNG : public Hardware_RNG +class BOTAN_PUBLIC_API(2,0) TPM_RNG final : public Hardware_RNG { public: TPM_RNG(TPM_Context& ctx) : m_ctx(ctx) {} @@ -103,7 +104,7 @@ enum class TPM_Storage_Type { User, System }; * Also implements the public interface, but does not have usable * TODO: derive from RSA_PublicKey??? */ -class BOTAN_PUBLIC_API(2,0) TPM_PrivateKey : public Private_Key +class BOTAN_PUBLIC_API(2,0) TPM_PrivateKey final : public Private_Key { public: // TODO: key import? diff --git a/src/lib/prov/tpm/uuid.h b/src/lib/prov/tpm/uuid.h index 08eb454bb..2c89d45b4 100644 --- a/src/lib/prov/tpm/uuid.h +++ b/src/lib/prov/tpm/uuid.h @@ -15,7 +15,7 @@ namespace Botan { // TODO: move to util? -class UUID +class UUID final { public: // Represents an unassigned UUID object diff --git a/src/lib/pubkey/blinding.h b/src/lib/pubkey/blinding.h index fc7cabe7a..1c3fb1444 100644 --- a/src/lib/pubkey/blinding.h +++ b/src/lib/pubkey/blinding.h @@ -19,7 +19,7 @@ class RandomNumberGenerator; /** * Blinding Function Object. */ -class BOTAN_PUBLIC_API(2,0) Blinder +class BOTAN_PUBLIC_API(2,0) Blinder final { public: /** diff --git a/src/lib/pubkey/cecpq1/cecpq1.h b/src/lib/pubkey/cecpq1/cecpq1.h index 535cb49b7..a722899c6 100644 --- a/src/lib/pubkey/cecpq1/cecpq1.h +++ b/src/lib/pubkey/cecpq1/cecpq1.h @@ -13,7 +13,7 @@ namespace Botan { -class CECPQ1_key +class CECPQ1_key final { public: secure_vector<uint8_t> m_x25519; diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 7776c6550..2d07f67ab 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -112,7 +112,7 @@ namespace { /** * Curve25519 operation */ -class Curve25519_KA_Operation : public PK_Ops::Key_Agreement_with_KDF +class Curve25519_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF { public: diff --git a/src/lib/pubkey/curve25519/curve25519.h b/src/lib/pubkey/curve25519/curve25519.h index 9f2136a69..1e06fae67 100644 --- a/src/lib/pubkey/curve25519/curve25519.h +++ b/src/lib/pubkey/curve25519/curve25519.h @@ -55,7 +55,7 @@ class BOTAN_PUBLIC_API(2,0) Curve25519_PublicKey : public virtual Public_Key std::vector<uint8_t> m_public; }; -class BOTAN_PUBLIC_API(2,0) Curve25519_PrivateKey : public Curve25519_PublicKey, +class BOTAN_PUBLIC_API(2,0) Curve25519_PrivateKey final : public Curve25519_PublicKey, public virtual Private_Key, public virtual PK_Key_Agreement_Key { diff --git a/src/lib/pubkey/dh/dh.cpp b/src/lib/pubkey/dh/dh.cpp index 25c5f5cf4..2a7742738 100644 --- a/src/lib/pubkey/dh/dh.cpp +++ b/src/lib/pubkey/dh/dh.cpp @@ -79,7 +79,7 @@ namespace { /** * DH operation */ -class DH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF +class DH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF { public: diff --git a/src/lib/pubkey/dh/dh.h b/src/lib/pubkey/dh/dh.h index a252f7a80..e3aa0d2c5 100644 --- a/src/lib/pubkey/dh/dh.h +++ b/src/lib/pubkey/dh/dh.h @@ -46,7 +46,7 @@ class BOTAN_PUBLIC_API(2,0) DH_PublicKey : public virtual DL_Scheme_PublicKey /** * This class represents Diffie-Hellman private keys. */ -class BOTAN_PUBLIC_API(2,0) DH_PrivateKey : public DH_PublicKey, +class BOTAN_PUBLIC_API(2,0) DH_PrivateKey final : public DH_PublicKey, public PK_Key_Agreement_Key, public virtual DL_Scheme_PrivateKey { diff --git a/src/lib/pubkey/dl_group/dl_group.h b/src/lib/pubkey/dl_group/dl_group.h index 4ec9962d7..24b829bd9 100644 --- a/src/lib/pubkey/dl_group/dl_group.h +++ b/src/lib/pubkey/dl_group/dl_group.h @@ -16,7 +16,7 @@ namespace Botan { * This class represents discrete logarithm groups. It holds a prime p, * a prime q = (p-1)/2 and g = x^((p-1)/q) mod p. */ -class BOTAN_PUBLIC_API(2,0) DL_Group +class BOTAN_PUBLIC_API(2,0) DL_Group final { public: diff --git a/src/lib/pubkey/dlies/dlies.h b/src/lib/pubkey/dlies/dlies.h index 471d29999..8fa673491 100644 --- a/src/lib/pubkey/dlies/dlies.h +++ b/src/lib/pubkey/dlies/dlies.h @@ -20,7 +20,7 @@ namespace Botan { /** * DLIES Encryption */ -class BOTAN_PUBLIC_API(2,0) DLIES_Encryptor : public PK_Encryptor +class BOTAN_PUBLIC_API(2,0) DLIES_Encryptor final : public PK_Encryptor { public: /** @@ -93,7 +93,7 @@ class BOTAN_PUBLIC_API(2,0) DLIES_Encryptor : public PK_Encryptor /** * DLIES Decryption */ -class BOTAN_PUBLIC_API(2,0) DLIES_Decryptor : public PK_Decryptor +class BOTAN_PUBLIC_API(2,0) DLIES_Decryptor final : public PK_Decryptor { public: /** diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp index 706722d72..532ede5d6 100644 --- a/src/lib/pubkey/dsa/dsa.cpp +++ b/src/lib/pubkey/dsa/dsa.cpp @@ -75,7 +75,7 @@ namespace { /** * Object that can create a DSA signature */ -class DSA_Signature_Operation : public PK_Ops::Signature_with_EMSA +class DSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA { public: DSA_Signature_Operation(const DSA_PrivateKey& dsa, const std::string& emsa) : @@ -143,7 +143,7 @@ DSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, /** * Object that can verify a DSA signature */ -class DSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class DSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: DSA_Verification_Operation(const DSA_PublicKey& dsa, diff --git a/src/lib/pubkey/dsa/dsa.h b/src/lib/pubkey/dsa/dsa.h index dc53d4801..b219a1cf3 100644 --- a/src/lib/pubkey/dsa/dsa.h +++ b/src/lib/pubkey/dsa/dsa.h @@ -52,7 +52,7 @@ class BOTAN_PUBLIC_API(2,0) DSA_PublicKey : public virtual DL_Scheme_PublicKey /** * DSA Private Key */ -class BOTAN_PUBLIC_API(2,0) DSA_PrivateKey : public DSA_PublicKey, +class BOTAN_PUBLIC_API(2,0) DSA_PrivateKey final : public DSA_PublicKey, public virtual DL_Scheme_PrivateKey { public: diff --git a/src/lib/pubkey/ec_group/ec_group.h b/src/lib/pubkey/ec_group/ec_group.h index 028ec1b32..ccd69a4dc 100644 --- a/src/lib/pubkey/ec_group/ec_group.h +++ b/src/lib/pubkey/ec_group/ec_group.h @@ -28,7 +28,7 @@ enum EC_Group_Encoding { /** * Class representing an elliptic curve */ -class BOTAN_PUBLIC_API(2,0) EC_Group +class BOTAN_PUBLIC_API(2,0) EC_Group final { public: diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp index 799e8aac9..c05f22d1b 100644 --- a/src/lib/pubkey/ecdh/ecdh.cpp +++ b/src/lib/pubkey/ecdh/ecdh.cpp @@ -22,7 +22,7 @@ namespace { /** * ECDH operation */ -class ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF +class ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF { public: diff --git a/src/lib/pubkey/ecdh/ecdh.h b/src/lib/pubkey/ecdh/ecdh.h index 6ae155bc4..d967c749f 100644 --- a/src/lib/pubkey/ecdh/ecdh.h +++ b/src/lib/pubkey/ecdh/ecdh.h @@ -63,7 +63,7 @@ class BOTAN_PUBLIC_API(2,0) ECDH_PublicKey : public virtual EC_PublicKey /** * This class represents ECDH Private Keys. */ -class BOTAN_PUBLIC_API(2,0) ECDH_PrivateKey : public ECDH_PublicKey, +class BOTAN_PUBLIC_API(2,0) ECDH_PrivateKey final : public ECDH_PublicKey, public EC_PrivateKey, public PK_Key_Agreement_Key { diff --git a/src/lib/pubkey/ecdsa/ecdsa.cpp b/src/lib/pubkey/ecdsa/ecdsa.cpp index 8b0248770..96bc50ec0 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.cpp +++ b/src/lib/pubkey/ecdsa/ecdsa.cpp @@ -45,7 +45,7 @@ namespace { /** * ECDSA signature operation */ -class ECDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA +class ECDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA { public: @@ -103,7 +103,7 @@ ECDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, /** * ECDSA verification operation */ -class ECDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class ECDSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: ECDSA_Verification_Operation(const ECDSA_PublicKey& ecdsa, diff --git a/src/lib/pubkey/ecdsa/ecdsa.h b/src/lib/pubkey/ecdsa/ecdsa.h index 09968d687..2929059c5 100644 --- a/src/lib/pubkey/ecdsa/ecdsa.h +++ b/src/lib/pubkey/ecdsa/ecdsa.h @@ -60,7 +60,7 @@ class BOTAN_PUBLIC_API(2,0) ECDSA_PublicKey : public virtual EC_PublicKey /** * This class represents ECDSA Private Keys */ -class BOTAN_PUBLIC_API(2,0) ECDSA_PrivateKey : public ECDSA_PublicKey, +class BOTAN_PUBLIC_API(2,0) ECDSA_PrivateKey final : public ECDSA_PublicKey, public EC_PrivateKey { public: diff --git a/src/lib/pubkey/ecgdsa/ecgdsa.cpp b/src/lib/pubkey/ecgdsa/ecgdsa.cpp index eb979cc1c..e5e17623f 100644 --- a/src/lib/pubkey/ecgdsa/ecgdsa.cpp +++ b/src/lib/pubkey/ecgdsa/ecgdsa.cpp @@ -29,7 +29,7 @@ namespace { /** * ECGDSA signature operation */ -class ECGDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA +class ECGDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA { public: @@ -77,7 +77,7 @@ ECGDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, /** * ECGDSA verification operation */ -class ECGDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class ECGDSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: diff --git a/src/lib/pubkey/ecgdsa/ecgdsa.h b/src/lib/pubkey/ecgdsa/ecgdsa.h index c34b2ce56..31d0e2be5 100644 --- a/src/lib/pubkey/ecgdsa/ecgdsa.h +++ b/src/lib/pubkey/ecgdsa/ecgdsa.h @@ -58,7 +58,7 @@ class BOTAN_PUBLIC_API(2,0) ECGDSA_PublicKey : public virtual EC_PublicKey /** * This class represents ECGDSA private keys. */ -class BOTAN_PUBLIC_API(2,0) ECGDSA_PrivateKey : public ECGDSA_PublicKey, +class BOTAN_PUBLIC_API(2,0) ECGDSA_PrivateKey final : public ECGDSA_PublicKey, public EC_PrivateKey { public: diff --git a/src/lib/pubkey/ecies/ecies.cpp b/src/lib/pubkey/ecies/ecies.cpp index e295efbef..39eb08afe 100644 --- a/src/lib/pubkey/ecies/ecies.cpp +++ b/src/lib/pubkey/ecies/ecies.cpp @@ -21,7 +21,7 @@ namespace { /** * Private key type for ECIES_ECDH_KA_Operation */ -class ECIES_PrivateKey : public EC_PrivateKey, public PK_Key_Agreement_Key +class ECIES_PrivateKey final : public EC_PrivateKey, public PK_Key_Agreement_Key { public: explicit ECIES_PrivateKey(const ECDH_PrivateKey& private_key) : @@ -54,7 +54,7 @@ class ECIES_PrivateKey : public EC_PrivateKey, public PK_Key_Agreement_Key /** * Implements ECDH key agreement without using the cofactor mode */ -class ECIES_ECDH_KA_Operation : public PK_Ops::Key_Agreement_with_KDF +class ECIES_ECDH_KA_Operation final : public PK_Ops::Key_Agreement_with_KDF { public: ECIES_ECDH_KA_Operation(const ECIES_PrivateKey& private_key, RandomNumberGenerator& rng) : diff --git a/src/lib/pubkey/ecies/ecies.h b/src/lib/pubkey/ecies/ecies.h index 382147db2..f7d055dea 100644 --- a/src/lib/pubkey/ecies/ecies.h +++ b/src/lib/pubkey/ecies/ecies.h @@ -121,7 +121,7 @@ class BOTAN_PUBLIC_API(2,0) ECIES_KA_Params }; -class BOTAN_PUBLIC_API(2,0) ECIES_System_Params : public ECIES_KA_Params +class BOTAN_PUBLIC_API(2,0) ECIES_System_Params final : public ECIES_KA_Params { public: /** @@ -214,7 +214,7 @@ class BOTAN_PUBLIC_API(2,0) ECIES_KA_Operation /** * ECIES Encryption according to ISO 18033-2 */ -class BOTAN_PUBLIC_API(2,0) ECIES_Encryptor : public PK_Encryptor +class BOTAN_PUBLIC_API(2,0) ECIES_Encryptor final : public PK_Encryptor { public: /** @@ -271,7 +271,7 @@ class BOTAN_PUBLIC_API(2,0) ECIES_Encryptor : public PK_Encryptor /** * ECIES Decryption according to ISO 18033-2 */ -class BOTAN_PUBLIC_API(2,0) ECIES_Decryptor : public PK_Decryptor +class BOTAN_PUBLIC_API(2,0) ECIES_Decryptor final : public PK_Decryptor { public: /** diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.cpp b/src/lib/pubkey/eckcdsa/eckcdsa.cpp index 778c0f833..2a320cc5a 100644 --- a/src/lib/pubkey/eckcdsa/eckcdsa.cpp +++ b/src/lib/pubkey/eckcdsa/eckcdsa.cpp @@ -35,7 +35,7 @@ namespace { /** * ECKCDSA signature operation */ -class ECKCDSA_Signature_Operation : public PK_Ops::Signature_with_EMSA +class ECKCDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA { public: @@ -106,7 +106,7 @@ ECKCDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t, /** * ECKCDSA verification operation */ -class ECKCDSA_Verification_Operation : public PK_Ops::Verification_with_EMSA +class ECKCDSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.h b/src/lib/pubkey/eckcdsa/eckcdsa.h index 3d2189b79..aa04cb146 100644 --- a/src/lib/pubkey/eckcdsa/eckcdsa.h +++ b/src/lib/pubkey/eckcdsa/eckcdsa.h @@ -58,7 +58,7 @@ class BOTAN_PUBLIC_API(2,0) ECKCDSA_PublicKey : public virtual EC_PublicKey /** * This class represents ECKCDSA private keys. */ -class BOTAN_PUBLIC_API(2,0) ECKCDSA_PrivateKey : public ECKCDSA_PublicKey, +class BOTAN_PUBLIC_API(2,0) ECKCDSA_PrivateKey final : public ECKCDSA_PublicKey, public EC_PrivateKey { public: diff --git a/src/lib/pubkey/ed25519/ed25519.h b/src/lib/pubkey/ed25519/ed25519.h index f295c1c41..f563115dd 100644 --- a/src/lib/pubkey/ed25519/ed25519.h +++ b/src/lib/pubkey/ed25519/ed25519.h @@ -62,7 +62,7 @@ class BOTAN_PUBLIC_API(2,2) Ed25519_PublicKey : public virtual Public_Key std::vector<uint8_t> m_public; }; -class BOTAN_PUBLIC_API(2,2) Ed25519_PrivateKey : public Ed25519_PublicKey, +class BOTAN_PUBLIC_API(2,2) Ed25519_PrivateKey final : public Ed25519_PublicKey, public virtual Private_Key { public: diff --git a/src/lib/pubkey/ed25519/ed25519_key.cpp b/src/lib/pubkey/ed25519/ed25519_key.cpp index 6089cfedf..269834a33 100644 --- a/src/lib/pubkey/ed25519/ed25519_key.cpp +++ b/src/lib/pubkey/ed25519/ed25519_key.cpp @@ -98,7 +98,7 @@ namespace { /** * Ed25519 verifying operation */ -class Ed25519_Pure_Verify_Operation : public PK_Ops::Verification +class Ed25519_Pure_Verify_Operation final : public PK_Ops::Verification { public: Ed25519_Pure_Verify_Operation(const Ed25519_PublicKey& key) : m_key(key) @@ -127,7 +127,7 @@ class Ed25519_Pure_Verify_Operation : public PK_Ops::Verification /** * Ed25519 verifying operation with pre-hash */ -class Ed25519_Hashed_Verify_Operation : public PK_Ops::Verification +class Ed25519_Hashed_Verify_Operation final : public PK_Ops::Verification { public: Ed25519_Hashed_Verify_Operation(const Ed25519_PublicKey& key, const std::string& hash) : m_key(key) @@ -157,7 +157,7 @@ class Ed25519_Hashed_Verify_Operation : public PK_Ops::Verification /** * Ed25519 signing operation ('pure' - signs message directly) */ -class Ed25519_Pure_Sign_Operation : public PK_Ops::Signature +class Ed25519_Pure_Sign_Operation final : public PK_Ops::Signature { public: Ed25519_Pure_Sign_Operation(const Ed25519_PrivateKey& key) : m_key(key) @@ -185,7 +185,7 @@ class Ed25519_Pure_Sign_Operation : public PK_Ops::Signature /** * Ed25519 signing operation with pre-hash */ -class Ed25519_Hashed_Sign_Operation : public PK_Ops::Signature +class Ed25519_Hashed_Sign_Operation final : public PK_Ops::Signature { public: Ed25519_Hashed_Sign_Operation(const Ed25519_PrivateKey& key, const std::string& hash) : m_key(key) diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp index 5a3f19362..a44f352f5 100644 --- a/src/lib/pubkey/elgamal/elgamal.cpp +++ b/src/lib/pubkey/elgamal/elgamal.cpp @@ -67,7 +67,7 @@ namespace { /** * ElGamal encryption operation */ -class ElGamal_Encryption_Operation : public PK_Ops::Encryption_with_EME +class ElGamal_Encryption_Operation final : public PK_Ops::Encryption_with_EME { public: @@ -119,7 +119,7 @@ ElGamal_Encryption_Operation::raw_encrypt(const uint8_t msg[], size_t msg_len, /** * ElGamal decryption operation */ -class ElGamal_Decryption_Operation : public PK_Ops::Decryption_with_EME +class ElGamal_Decryption_Operation final : public PK_Ops::Decryption_with_EME { public: diff --git a/src/lib/pubkey/elgamal/elgamal.h b/src/lib/pubkey/elgamal/elgamal.h index 41fac4aae..e4d932f6a 100644 --- a/src/lib/pubkey/elgamal/elgamal.h +++ b/src/lib/pubkey/elgamal/elgamal.h @@ -50,7 +50,7 @@ class BOTAN_PUBLIC_API(2,0) ElGamal_PublicKey : public virtual DL_Scheme_PublicK /** * ElGamal Private Key */ -class BOTAN_PUBLIC_API(2,0) ElGamal_PrivateKey : public ElGamal_PublicKey, +class BOTAN_PUBLIC_API(2,0) ElGamal_PrivateKey final : public ElGamal_PublicKey, public virtual DL_Scheme_PrivateKey { public: diff --git a/src/lib/pubkey/gost_3410/gost_3410.cpp b/src/lib/pubkey/gost_3410/gost_3410.cpp index ee263bb96..324b7e985 100644 --- a/src/lib/pubkey/gost_3410/gost_3410.cpp +++ b/src/lib/pubkey/gost_3410/gost_3410.cpp @@ -94,7 +94,7 @@ BigInt decode_le(const uint8_t msg[], size_t msg_len) /** * GOST-34.10 signature operation */ -class GOST_3410_Signature_Operation : public PK_Ops::Signature_with_EMSA +class GOST_3410_Signature_Operation final : public PK_Ops::Signature_with_EMSA { public: GOST_3410_Signature_Operation(const GOST_3410_PrivateKey& gost_3410, @@ -150,7 +150,7 @@ GOST_3410_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len, /** * GOST-34.10 verification operation */ -class GOST_3410_Verification_Operation : public PK_Ops::Verification_with_EMSA +class GOST_3410_Verification_Operation final : public PK_Ops::Verification_with_EMSA { public: diff --git a/src/lib/pubkey/gost_3410/gost_3410.h b/src/lib/pubkey/gost_3410/gost_3410.h index cd9f03dac..52b6ad758 100644 --- a/src/lib/pubkey/gost_3410/gost_3410.h +++ b/src/lib/pubkey/gost_3410/gost_3410.h @@ -64,7 +64,7 @@ class BOTAN_PUBLIC_API(2,0) GOST_3410_PublicKey : public virtual EC_PublicKey /** * GOST-34.10 Private Key */ -class BOTAN_PUBLIC_API(2,0) GOST_3410_PrivateKey : public GOST_3410_PublicKey, +class BOTAN_PUBLIC_API(2,0) GOST_3410_PrivateKey final : public GOST_3410_PublicKey, public EC_PrivateKey { public: diff --git a/src/lib/pubkey/mce/mceliece.h b/src/lib/pubkey/mce/mceliece.h index c9b2e0afc..54f043472 100644 --- a/src/lib/pubkey/mce/mceliece.h +++ b/src/lib/pubkey/mce/mceliece.h @@ -67,7 +67,7 @@ class BOTAN_PUBLIC_API(2,0) McEliece_PublicKey : public virtual Public_Key uint32_t m_code_length; }; -class BOTAN_PUBLIC_API(2,0) McEliece_PrivateKey : public virtual McEliece_PublicKey, +class BOTAN_PUBLIC_API(2,0) McEliece_PrivateKey final : public virtual McEliece_PublicKey, public virtual Private_Key { public: diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp index 24a6420f2..5d8378e52 100644 --- a/src/lib/pubkey/mce/mceliece_key.cpp +++ b/src/lib/pubkey/mce/mceliece_key.cpp @@ -294,7 +294,7 @@ bool McEliece_PublicKey::operator==(const McEliece_PublicKey& other) const namespace { -class MCE_KEM_Encryptor : public PK_Ops::KEM_Encryption_with_KDF +class MCE_KEM_Encryptor final : public PK_Ops::KEM_Encryption_with_KDF { public: @@ -322,7 +322,7 @@ class MCE_KEM_Encryptor : public PK_Ops::KEM_Encryption_with_KDF const McEliece_PublicKey& m_key; }; -class MCE_KEM_Decryptor : public PK_Ops::KEM_Decryption_with_KDF +class MCE_KEM_Decryptor final : public PK_Ops::KEM_Decryption_with_KDF { public: diff --git a/src/lib/pubkey/pkcs8.h b/src/lib/pubkey/pkcs8.h index 4982f4a89..b75a44180 100644 --- a/src/lib/pubkey/pkcs8.h +++ b/src/lib/pubkey/pkcs8.h @@ -17,7 +17,7 @@ namespace Botan { /** * PKCS #8 General Exception */ -struct BOTAN_PUBLIC_API(2,0) PKCS8_Exception : public Decoding_Error +struct BOTAN_PUBLIC_API(2,0) PKCS8_Exception final : public Decoding_Error { explicit PKCS8_Exception(const std::string& error) : Decoding_Error("PKCS #8: " + error) {} diff --git a/src/lib/pubkey/rfc6979/rfc6979.h b/src/lib/pubkey/rfc6979/rfc6979.h index 2afe9ca9a..d78effc26 100644 --- a/src/lib/pubkey/rfc6979/rfc6979.h +++ b/src/lib/pubkey/rfc6979/rfc6979.h @@ -16,7 +16,7 @@ namespace Botan { class HMAC_DRBG; -class BOTAN_PUBLIC_API(2,0) RFC6979_Nonce_Generator +class BOTAN_PUBLIC_API(2,0) RFC6979_Nonce_Generator final { public: /** diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp index cafe6b069..bd02d1f19 100644 --- a/src/lib/pubkey/rsa/rsa.cpp +++ b/src/lib/pubkey/rsa/rsa.cpp @@ -239,7 +239,7 @@ class RSA_Private_Operation Blinder m_blinder; }; -class RSA_Signature_Operation : public PK_Ops::Signature_with_EMSA, +class RSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA, private RSA_Private_Operation { public: @@ -263,7 +263,7 @@ class RSA_Signature_Operation : public PK_Ops::Signature_with_EMSA, } }; -class RSA_Decryption_Operation : public PK_Ops::Decryption_with_EME, +class RSA_Decryption_Operation final : public PK_Ops::Decryption_with_EME, private RSA_Private_Operation { public: @@ -286,7 +286,7 @@ class RSA_Decryption_Operation : public PK_Ops::Decryption_with_EME, } }; -class RSA_KEM_Decryption_Operation : public PK_Ops::KEM_Decryption_with_KDF, +class RSA_KEM_Decryption_Operation final : public PK_Ops::KEM_Decryption_with_KDF, private RSA_Private_Operation { public: @@ -335,7 +335,7 @@ class RSA_Public_Operation Fixed_Exponent_Power_Mod m_powermod_e_n; }; -class RSA_Encryption_Operation : public PK_Ops::Encryption_with_EME, +class RSA_Encryption_Operation final : public PK_Ops::Encryption_with_EME, private RSA_Public_Operation { public: @@ -356,7 +356,7 @@ class RSA_Encryption_Operation : public PK_Ops::Encryption_with_EME, } }; -class RSA_Verify_Operation : public PK_Ops::Verification_with_EMSA, +class RSA_Verify_Operation final : public PK_Ops::Verification_with_EMSA, private RSA_Public_Operation { public: @@ -378,7 +378,7 @@ class RSA_Verify_Operation : public PK_Ops::Verification_with_EMSA, } }; -class RSA_KEM_Encryption_Operation : public PK_Ops::KEM_Encryption_with_KDF, +class RSA_KEM_Encryption_Operation final : public PK_Ops::KEM_Encryption_with_KDF, private RSA_Public_Operation { public: diff --git a/src/lib/pubkey/rsa/rsa.h b/src/lib/pubkey/rsa/rsa.h index 09c945c82..ad4fceab9 100644 --- a/src/lib/pubkey/rsa/rsa.h +++ b/src/lib/pubkey/rsa/rsa.h @@ -79,7 +79,7 @@ class BOTAN_PUBLIC_API(2,0) RSA_PublicKey : public virtual Public_Key /** * RSA Private Key */ -class BOTAN_PUBLIC_API(2,0) RSA_PrivateKey : public Private_Key, public RSA_PublicKey +class BOTAN_PUBLIC_API(2,0) RSA_PrivateKey final : public Private_Key, public RSA_PublicKey { public: /** diff --git a/src/lib/pubkey/sm2/sm2.cpp b/src/lib/pubkey/sm2/sm2.cpp index dbb22ca6d..1b20ee6fa 100644 --- a/src/lib/pubkey/sm2/sm2.cpp +++ b/src/lib/pubkey/sm2/sm2.cpp @@ -74,7 +74,7 @@ namespace { /** * SM2 signature operation */ -class SM2_Signature_Operation : public PK_Ops::Signature +class SM2_Signature_Operation final : public PK_Ops::Signature { public: @@ -131,7 +131,7 @@ SM2_Signature_Operation::sign(RandomNumberGenerator& rng) /** * SM2 verification operation */ -class SM2_Verification_Operation : public PK_Ops::Verification +class SM2_Verification_Operation final : public PK_Ops::Verification { public: SM2_Verification_Operation(const SM2_Signature_PublicKey& sm2, diff --git a/src/lib/pubkey/sm2/sm2.h b/src/lib/pubkey/sm2/sm2.h index bb88065f5..7f702e134 100644 --- a/src/lib/pubkey/sm2/sm2.h +++ b/src/lib/pubkey/sm2/sm2.h @@ -58,7 +58,7 @@ class BOTAN_PUBLIC_API(2,2) SM2_Signature_PublicKey : public virtual EC_PublicKe /** * This class represents SM2 Signature private keys */ -class BOTAN_PUBLIC_API(2,2) SM2_Signature_PrivateKey : public SM2_Signature_PublicKey, +class BOTAN_PUBLIC_API(2,2) SM2_Signature_PrivateKey final : public SM2_Signature_PublicKey, public EC_PrivateKey { public: diff --git a/src/lib/pubkey/sm2/sm2_enc.cpp b/src/lib/pubkey/sm2/sm2_enc.cpp index 2d44faacb..b697daf1e 100644 --- a/src/lib/pubkey/sm2/sm2_enc.cpp +++ b/src/lib/pubkey/sm2/sm2_enc.cpp @@ -42,7 +42,7 @@ SM2_Encryption_PrivateKey::SM2_Encryption_PrivateKey(RandomNumberGenerator& rng, namespace { -class SM2_Encryption_Operation : public PK_Ops::Encryption +class SM2_Encryption_Operation final : public PK_Ops::Encryption { public: SM2_Encryption_Operation(const SM2_Encryption_PublicKey& key, const std::string& kdf_hash) : @@ -119,7 +119,7 @@ class SM2_Encryption_Operation : public PK_Ops::Encryption const std::string m_kdf_hash; }; -class SM2_Decryption_Operation : public PK_Ops::Decryption +class SM2_Decryption_Operation final : public PK_Ops::Decryption { public: SM2_Decryption_Operation(const SM2_Encryption_PrivateKey& key, diff --git a/src/lib/pubkey/xmss/xmss_privatekey.h b/src/lib/pubkey/xmss/xmss_privatekey.h index b5cbf9cac..5936009bd 100644 --- a/src/lib/pubkey/xmss/xmss_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_privatekey.h @@ -36,7 +36,7 @@ namespace Botan { * https://datatracker.ietf.org/doc/ * draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1 **/ -class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey : public virtual XMSS_PublicKey, +class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKey, public XMSS_Common_Ops, public virtual Private_Key { diff --git a/src/lib/pubkey/xmss/xmss_signature_operation.h b/src/lib/pubkey/xmss/xmss_signature_operation.h index 7a5845818..f974213e0 100644 --- a/src/lib/pubkey/xmss/xmss_signature_operation.h +++ b/src/lib/pubkey/xmss/xmss_signature_operation.h @@ -32,7 +32,7 @@ namespace Botan { * https://datatracker.ietf.org/doc/ * draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1 **/ -class XMSS_Signature_Operation : public virtual PK_Ops::Signature, +class XMSS_Signature_Operation final : public virtual PK_Ops::Signature, public XMSS_Common_Ops { public: diff --git a/src/lib/pubkey/xmss/xmss_verification_operation.h b/src/lib/pubkey/xmss/xmss_verification_operation.h index de8816134..f5079303c 100644 --- a/src/lib/pubkey/xmss/xmss_verification_operation.h +++ b/src/lib/pubkey/xmss/xmss_verification_operation.h @@ -25,7 +25,7 @@ namespace Botan { * Signatures (XMSS). **/ class XMSS_Verification_Operation - : public virtual PK_Ops::Verification, + final : public virtual PK_Ops::Verification, public XMSS_Common_Ops { public: diff --git a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h index f3031818c..227ef211c 100644 --- a/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_wots_addressed_privatekey.h @@ -22,7 +22,7 @@ namespace Botan { * XMSS_WOTS_Signature_Operation() on creation. **/ class XMSS_WOTS_Addressed_PrivateKey - : public virtual XMSS_WOTS_Addressed_PublicKey, + final : public virtual XMSS_WOTS_Addressed_PublicKey, public virtual Private_Key { public: diff --git a/src/lib/pubkey/xmss/xmss_wots_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_privatekey.h index fa8a23cad..8fb4e0233 100644 --- a/src/lib/pubkey/xmss/xmss_wots_privatekey.h +++ b/src/lib/pubkey/xmss/xmss_wots_privatekey.h @@ -23,7 +23,7 @@ namespace Botan { /** A Winternitz One Time Signature private key for use with Extended Hash-Based * Signatures. **/ -class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PrivateKey : public virtual XMSS_WOTS_PublicKey, +class BOTAN_PUBLIC_API(2,0) XMSS_WOTS_PrivateKey final : public virtual XMSS_WOTS_PublicKey, public virtual Private_Key { public: diff --git a/src/lib/pubkey/xmss/xmss_wots_signature_operation.h b/src/lib/pubkey/xmss/xmss_wots_signature_operation.h index 271766e87..5873c4ec4 100644 --- a/src/lib/pubkey/xmss/xmss_wots_signature_operation.h +++ b/src/lib/pubkey/xmss/xmss_wots_signature_operation.h @@ -24,7 +24,7 @@ namespace Botan { * This operation is not intended for stand-alone use and thus not registered * in the Botan algorithm registry. ***/ -class XMSS_WOTS_Signature_Operation : public virtual PK_Ops::Signature, +class XMSS_WOTS_Signature_Operation final : public virtual PK_Ops::Signature, public XMSS_WOTS_Common_Ops { public: diff --git a/src/lib/pubkey/xmss/xmss_wots_verification_operation.h b/src/lib/pubkey/xmss/xmss_wots_verification_operation.h index 3575e320a..863e05de7 100644 --- a/src/lib/pubkey/xmss/xmss_wots_verification_operation.h +++ b/src/lib/pubkey/xmss/xmss_wots_verification_operation.h @@ -25,7 +25,7 @@ namespace Botan { * in the Botan algorithm registry. **/ class XMSS_WOTS_Verification_Operation - : public virtual PK_Ops::Verification, + final : public virtual PK_Ops::Verification, public XMSS_WOTS_Common_Ops { public: diff --git a/src/lib/rng/rdrand_rng/rdrand_rng.h b/src/lib/rng/rdrand_rng/rdrand_rng.h index de9798e70..c4cfbdc5c 100644 --- a/src/lib/rng/rdrand_rng/rdrand_rng.h +++ b/src/lib/rng/rdrand_rng/rdrand_rng.h @@ -12,7 +12,7 @@ namespace Botan { -class BOTAN_PUBLIC_API(2,0) RDRAND_RNG : public Hardware_RNG +class BOTAN_PUBLIC_API(2,0) RDRAND_RNG final : public Hardware_RNG { public: /** diff --git a/src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.h b/src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.h index bd092c5b0..f906ae585 100644 --- a/src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.h +++ b/src/lib/tls/sessions_sqlite3/tls_session_manager_sqlite.h @@ -25,7 +25,7 @@ namespace TLS { * serious privacy risk in some situations. */ class BOTAN_PUBLIC_API(2,0) -Session_Manager_SQLite : public Session_Manager_SQL +Session_Manager_SQLite final : public Session_Manager_SQL { public: /** diff --git a/src/lib/tls/tls_alert.h b/src/lib/tls/tls_alert.h index f76fc4af1..89530e238 100644 --- a/src/lib/tls/tls_alert.h +++ b/src/lib/tls/tls_alert.h @@ -18,7 +18,7 @@ namespace TLS { /** * SSL/TLS Alert Message */ -class BOTAN_PUBLIC_API(2,0) Alert +class BOTAN_PUBLIC_API(2,0) Alert final { public: /** diff --git a/src/lib/tls/tls_blocking.h b/src/lib/tls/tls_blocking.h index 01620c652..c40d127ca 100644 --- a/src/lib/tls/tls_blocking.h +++ b/src/lib/tls/tls_blocking.h @@ -19,7 +19,7 @@ namespace TLS { * Blocking TLS Client * Can be used directly, or subclass to get handshake and alert notifications */ -class BOTAN_PUBLIC_API(2,0) Blocking_Client +class BOTAN_PUBLIC_API(2,0) Blocking_Client final { public: /* diff --git a/src/lib/tls/tls_ciphersuite.h b/src/lib/tls/tls_ciphersuite.h index 4543d81d2..6c2836f9d 100644 --- a/src/lib/tls/tls_ciphersuite.h +++ b/src/lib/tls/tls_ciphersuite.h @@ -19,7 +19,7 @@ namespace TLS { /** * Ciphersuite Information */ -class BOTAN_PUBLIC_API(2,0) Ciphersuite +class BOTAN_PUBLIC_API(2,0) Ciphersuite final { public: /** diff --git a/src/lib/tls/tls_client.cpp b/src/lib/tls/tls_client.cpp index 53d673a5c..ce19f04c9 100644 --- a/src/lib/tls/tls_client.cpp +++ b/src/lib/tls/tls_client.cpp @@ -19,7 +19,7 @@ namespace TLS { namespace { -class Client_Handshake_State : public Handshake_State +class Client_Handshake_State final : public Handshake_State { public: // using Handshake_State::Handshake_State; diff --git a/src/lib/tls/tls_exceptn.h b/src/lib/tls/tls_exceptn.h index 79b1042d3..1b58e1beb 100644 --- a/src/lib/tls/tls_exceptn.h +++ b/src/lib/tls/tls_exceptn.h @@ -34,7 +34,7 @@ class BOTAN_PUBLIC_API(2,0) TLS_Exception : public Exception /** * Unexpected_Message Exception */ -struct BOTAN_PUBLIC_API(2,0) Unexpected_Message : public TLS_Exception +struct BOTAN_PUBLIC_API(2,0) Unexpected_Message final : public TLS_Exception { explicit Unexpected_Message(const std::string& err) : TLS_Exception(Alert::UNEXPECTED_MESSAGE, err) {} diff --git a/src/lib/tls/tls_extensions.h b/src/lib/tls/tls_extensions.h index 9a92a1135..ee3310563 100644 --- a/src/lib/tls/tls_extensions.h +++ b/src/lib/tls/tls_extensions.h @@ -426,7 +426,7 @@ class Certificate_Status_Request final : public Extension /** * Represents a block of extensions in a hello message */ -class BOTAN_UNSTABLE_API Extensions +class BOTAN_UNSTABLE_API Extensions final { public: std::set<Handshake_Extension_Type> extension_types() const; diff --git a/src/lib/tls/tls_handshake_hash.h b/src/lib/tls/tls_handshake_hash.h index 1f80e2c3a..bb38015c8 100644 --- a/src/lib/tls/tls_handshake_hash.h +++ b/src/lib/tls/tls_handshake_hash.h @@ -18,7 +18,7 @@ namespace TLS { /** * TLS Handshake Hash */ -class Handshake_Hash +class Handshake_Hash final { public: void update(const uint8_t in[], size_t length) diff --git a/src/lib/tls/tls_policy.cpp b/src/lib/tls/tls_policy.cpp index 05a5b8b83..43926e314 100644 --- a/src/lib/tls/tls_policy.cpp +++ b/src/lib/tls/tls_policy.cpp @@ -317,7 +317,7 @@ std::vector<uint16_t> Policy::srtp_profiles() const namespace { -class Ciphersuite_Preference_Ordering +class Ciphersuite_Preference_Ordering final { public: Ciphersuite_Preference_Ordering(const std::vector<std::string>& ciphers, diff --git a/src/lib/tls/tls_policy.h b/src/lib/tls/tls_policy.h index 7e55f4eca..463f1c6d6 100644 --- a/src/lib/tls/tls_policy.h +++ b/src/lib/tls/tls_policy.h @@ -309,7 +309,7 @@ class BOTAN_PUBLIC_API(2,0) Policy /** * NSA Suite B 128-bit security level (RFC 6460) */ -class BOTAN_PUBLIC_API(2,0) NSA_Suite_B_128 : public Policy +class BOTAN_PUBLIC_API(2,0) NSA_Suite_B_128 final : public Policy { public: std::vector<std::string> allowed_ciphers() const override @@ -342,7 +342,7 @@ class BOTAN_PUBLIC_API(2,0) NSA_Suite_B_128 : public Policy /** * BSI TR-02102-2 Policy */ -class BOTAN_PUBLIC_API(2,0) BSI_TR_02102_2 : public Policy +class BOTAN_PUBLIC_API(2,0) BSI_TR_02102_2 final : public Policy { public: std::vector<std::string> allowed_ciphers() const override @@ -397,7 +397,7 @@ class BOTAN_PUBLIC_API(2,0) BSI_TR_02102_2 : public Policy /** * Policy for DTLS. We require DTLS v1.2 and an AEAD mode. */ -class BOTAN_PUBLIC_API(2,0) Datagram_Policy : public Policy +class BOTAN_PUBLIC_API(2,0) Datagram_Policy final : public Policy { public: std::vector<std::string> allowed_macs() const override @@ -417,7 +417,7 @@ class BOTAN_PUBLIC_API(2,0) Datagram_Policy : public Policy * to use if you control both sides of the protocol and don't have to worry * about ancient and/or bizarre TLS implementations. */ -class BOTAN_PUBLIC_API(2,0) Strict_Policy : public Policy +class BOTAN_PUBLIC_API(2,0) Strict_Policy final : public Policy { public: std::vector<std::string> allowed_ciphers() const override; diff --git a/src/lib/tls/tls_reader.h b/src/lib/tls/tls_reader.h index e88335227..588335144 100644 --- a/src/lib/tls/tls_reader.h +++ b/src/lib/tls/tls_reader.h @@ -21,7 +21,7 @@ namespace TLS { /** * Helper class for decoding TLS protocol messages */ -class TLS_Data_Reader +class TLS_Data_Reader final { public: TLS_Data_Reader(const char* type, const std::vector<uint8_t>& buf_in) : diff --git a/src/lib/tls/tls_record.h b/src/lib/tls/tls_record.h index 63989a17e..1fe3a558b 100644 --- a/src/lib/tls/tls_record.h +++ b/src/lib/tls/tls_record.h @@ -28,7 +28,7 @@ class Connection_Sequence_Numbers; /** * TLS Cipher State */ -class Connection_Cipher_State +class Connection_Cipher_State final { public: /** @@ -71,7 +71,7 @@ class Connection_Cipher_State bool m_cbc_nonce; }; -class Record +class Record final { public: Record(secure_vector<uint8_t>& data, @@ -99,7 +99,7 @@ class Record size_t m_size; }; -class Record_Message +class Record_Message final { public: Record_Message(const uint8_t* data, size_t size) @@ -120,7 +120,7 @@ class Record_Message size_t m_size; }; -class Record_Raw_Input +class Record_Raw_Input final { public: Record_Raw_Input(const uint8_t* data, size_t size, size_t& consumed, diff --git a/src/lib/tls/tls_server.cpp b/src/lib/tls/tls_server.cpp index 1c9ca0b86..c0e853a80 100644 --- a/src/lib/tls/tls_server.cpp +++ b/src/lib/tls/tls_server.cpp @@ -16,7 +16,7 @@ namespace Botan { namespace TLS { -class Server_Handshake_State : public Handshake_State +class Server_Handshake_State final : public Handshake_State { public: Server_Handshake_State(Handshake_IO* io, Callbacks& cb) diff --git a/src/lib/tls/tls_server_info.h b/src/lib/tls/tls_server_info.h index d1d66bdb6..d05af6acc 100644 --- a/src/lib/tls/tls_server_info.h +++ b/src/lib/tls/tls_server_info.h @@ -18,7 +18,7 @@ namespace TLS { /** * Represents information known about a TLS server. */ -class BOTAN_PUBLIC_API(2,0) Server_Information +class BOTAN_PUBLIC_API(2,0) Server_Information final { public: /** diff --git a/src/lib/tls/tls_session.h b/src/lib/tls/tls_session.h index 5b31e8622..62e2b2df9 100644 --- a/src/lib/tls/tls_session.h +++ b/src/lib/tls/tls_session.h @@ -24,7 +24,7 @@ namespace TLS { /** * Class representing a TLS session state */ -class BOTAN_PUBLIC_API(2,0) Session +class BOTAN_PUBLIC_API(2,0) Session final { public: diff --git a/src/lib/tls/tls_session_key.h b/src/lib/tls/tls_session_key.h index ae0db88ca..2c1eac523 100644 --- a/src/lib/tls/tls_session_key.h +++ b/src/lib/tls/tls_session_key.h @@ -19,7 +19,7 @@ class Handshake_State; /** * TLS Session Keys */ -class Session_Keys +class Session_Keys final { public: /** diff --git a/src/lib/tls/tls_session_manager.h b/src/lib/tls/tls_session_manager.h index 215ad1303..e6b5a3194 100644 --- a/src/lib/tls/tls_session_manager.h +++ b/src/lib/tls/tls_session_manager.h @@ -83,7 +83,7 @@ class BOTAN_PUBLIC_API(2,0) Session_Manager * An implementation of Session_Manager that does not save sessions at * all, preventing session resumption. */ -class BOTAN_PUBLIC_API(2,0) Session_Manager_Noop : public Session_Manager +class BOTAN_PUBLIC_API(2,0) Session_Manager_Noop final : public Session_Manager { public: bool load_from_session_id(const std::vector<uint8_t>&, Session&) override @@ -105,7 +105,7 @@ class BOTAN_PUBLIC_API(2,0) Session_Manager_Noop : public Session_Manager /** * An implementation of Session_Manager that saves values in memory. */ -class BOTAN_PUBLIC_API(2,0) Session_Manager_In_Memory : public Session_Manager +class BOTAN_PUBLIC_API(2,0) Session_Manager_In_Memory final : public Session_Manager { public: /** diff --git a/src/lib/tls/tls_version.h b/src/lib/tls/tls_version.h index a311db909..dd1d09530 100644 --- a/src/lib/tls/tls_version.h +++ b/src/lib/tls/tls_version.h @@ -18,7 +18,7 @@ namespace TLS { /** * TLS Protocol Version */ -class BOTAN_PUBLIC_API(2,0) Protocol_Version +class BOTAN_PUBLIC_API(2,0) Protocol_Version final { public: enum Version_Code { diff --git a/src/lib/utils/barrier.h b/src/lib/utils/barrier.h index 303ac5a98..9b7fdd59d 100644 --- a/src/lib/utils/barrier.h +++ b/src/lib/utils/barrier.h @@ -23,7 +23,7 @@ namespace Botan { // m_syncs counter is incremented. m_syncs is a counter to ensure that wait() // can be called after a sync() even if the previously sleeping threads have // not awoken.) -class Barrier +class Barrier final { public: explicit Barrier(int value = 0) : m_value(value), m_syncs(0) {} diff --git a/src/lib/utils/cpuid/cpuid.h b/src/lib/utils/cpuid/cpuid.h index 839b72167..f9186f918 100644 --- a/src/lib/utils/cpuid/cpuid.h +++ b/src/lib/utils/cpuid/cpuid.h @@ -33,7 +33,7 @@ namespace Botan { * thread-unsafe mechanism involving executing probe functions which * catching SIGILL signal is used. */ -class BOTAN_PUBLIC_API(2,1) CPUID +class BOTAN_PUBLIC_API(2,1) CPUID final { public: /** diff --git a/src/lib/utils/data_src.h b/src/lib/utils/data_src.h index 616556e46..346ec20f7 100644 --- a/src/lib/utils/data_src.h +++ b/src/lib/utils/data_src.h @@ -95,7 +95,7 @@ class BOTAN_PUBLIC_API(2,0) DataSource /** * This class represents a Memory-Based DataSource */ -class BOTAN_PUBLIC_API(2,0) DataSource_Memory : public DataSource +class BOTAN_PUBLIC_API(2,0) DataSource_Memory final : public DataSource { public: size_t read(uint8_t[], size_t) override; @@ -140,7 +140,7 @@ class BOTAN_PUBLIC_API(2,0) DataSource_Memory : public DataSource /** * This class represents a Stream-Based DataSource. */ -class BOTAN_PUBLIC_API(2,0) DataSource_Stream : public DataSource +class BOTAN_PUBLIC_API(2,0) DataSource_Stream final : public DataSource { public: size_t read(uint8_t[], size_t) override; diff --git a/src/lib/utils/database.h b/src/lib/utils/database.h index cd30c64ae..eb59cc376 100644 --- a/src/lib/utils/database.h +++ b/src/lib/utils/database.h @@ -20,7 +20,7 @@ class BOTAN_PUBLIC_API(2,0) SQL_Database { public: - class BOTAN_PUBLIC_API(2,0) SQL_DB_Error : public Exception + class BOTAN_PUBLIC_API(2,0) SQL_DB_Error final : public Exception { public: explicit SQL_DB_Error(const std::string& what) : Exception("SQL database", what) {} diff --git a/src/lib/utils/donna128.h b/src/lib/utils/donna128.h index 9efc4e332..5d5b18695 100644 --- a/src/lib/utils/donna128.h +++ b/src/lib/utils/donna128.h @@ -12,7 +12,7 @@ namespace Botan { -class donna128 +class donna128 final { public: donna128(uint64_t ll = 0, uint64_t hh = 0) { l = ll; h = hh; } diff --git a/src/lib/utils/dyn_load/dyn_load.h b/src/lib/utils/dyn_load/dyn_load.h index 581eac724..3caf65f27 100644 --- a/src/lib/utils/dyn_load/dyn_load.h +++ b/src/lib/utils/dyn_load/dyn_load.h @@ -16,7 +16,7 @@ namespace Botan { /** * Represents a DLL or shared object */ -class BOTAN_PUBLIC_API(2,0) Dynamically_Loaded_Library +class BOTAN_PUBLIC_API(2,0) Dynamically_Loaded_Library final { public: /** diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h index bb8c245f6..5242e87d9 100644 --- a/src/lib/utils/exceptn.h +++ b/src/lib/utils/exceptn.h @@ -49,7 +49,7 @@ class BOTAN_PUBLIC_API(2,0) Invalid_Argument : public Exception * An argument that is invalid because it is not supported by Botan. * It might or might not be valid in another context like a standard. */ -struct BOTAN_PUBLIC_API(2,0) Unsupported_Argument : public Invalid_Argument +struct BOTAN_PUBLIC_API(2,0) Unsupported_Argument final : public Invalid_Argument { explicit Unsupported_Argument(const std::string& msg) : Invalid_Argument(msg) {} }; @@ -94,7 +94,7 @@ struct BOTAN_PUBLIC_API(2,0) Internal_Error : public Exception /** * Invalid_Key_Length Exception */ -struct BOTAN_PUBLIC_API(2,0) Invalid_Key_Length : public Invalid_Argument +struct BOTAN_PUBLIC_API(2,0) Invalid_Key_Length final : public Invalid_Argument { Invalid_Key_Length(const std::string& name, size_t length) : Invalid_Argument(name + " cannot accept a key of length " + @@ -105,7 +105,7 @@ struct BOTAN_PUBLIC_API(2,0) Invalid_Key_Length : public Invalid_Argument /** * Invalid_IV_Length Exception */ -struct BOTAN_PUBLIC_API(2,0) Invalid_IV_Length : public Invalid_Argument +struct BOTAN_PUBLIC_API(2,0) Invalid_IV_Length final : public Invalid_Argument { Invalid_IV_Length(const std::string& mode, size_t bad_len) : Invalid_Argument("IV length " + std::to_string(bad_len) + @@ -116,7 +116,7 @@ struct BOTAN_PUBLIC_API(2,0) Invalid_IV_Length : public Invalid_Argument /** * PRNG_Unseeded Exception */ -struct BOTAN_PUBLIC_API(2,0) PRNG_Unseeded : public Invalid_State +struct BOTAN_PUBLIC_API(2,0) PRNG_Unseeded final : public Invalid_State { explicit PRNG_Unseeded(const std::string& algo) : Invalid_State("PRNG not seeded: " + algo) @@ -126,7 +126,7 @@ struct BOTAN_PUBLIC_API(2,0) PRNG_Unseeded : public Invalid_State /** * Policy_Violation Exception */ -struct BOTAN_PUBLIC_API(2,0) Policy_Violation : public Invalid_State +struct BOTAN_PUBLIC_API(2,0) Policy_Violation final : public Invalid_State { explicit Policy_Violation(const std::string& err) : Invalid_State("Policy violation: " + err) @@ -136,7 +136,7 @@ struct BOTAN_PUBLIC_API(2,0) Policy_Violation : public Invalid_State /** * Algorithm_Not_Found Exception */ -struct BOTAN_PUBLIC_API(2,0) Algorithm_Not_Found : public Lookup_Error +struct BOTAN_PUBLIC_API(2,0) Algorithm_Not_Found final : public Lookup_Error { explicit Algorithm_Not_Found(const std::string& name) : Lookup_Error("Could not find any algorithm named \"" + name + "\"") @@ -146,7 +146,7 @@ struct BOTAN_PUBLIC_API(2,0) Algorithm_Not_Found : public Lookup_Error /** * No_Provider_Found Exception */ -struct BOTAN_PUBLIC_API(2,0) No_Provider_Found : public Exception +struct BOTAN_PUBLIC_API(2,0) No_Provider_Found final : public Exception { explicit No_Provider_Found(const std::string& name) : Exception("Could not find any provider for algorithm named \"" + name + "\"") @@ -157,7 +157,7 @@ struct BOTAN_PUBLIC_API(2,0) No_Provider_Found : public Exception * Provider_Not_Found is thrown when a specific provider was requested * but that provider is not available. */ -struct BOTAN_PUBLIC_API(2,0) Provider_Not_Found : public Lookup_Error +struct BOTAN_PUBLIC_API(2,0) Provider_Not_Found final : public Lookup_Error { Provider_Not_Found(const std::string& algo, const std::string& provider) : Lookup_Error("Could not find provider '" + provider + "' for " + algo) {} @@ -166,7 +166,7 @@ struct BOTAN_PUBLIC_API(2,0) Provider_Not_Found : public Lookup_Error /** * Invalid_Algorithm_Name Exception */ -struct BOTAN_PUBLIC_API(2,0) Invalid_Algorithm_Name : public Invalid_Argument +struct BOTAN_PUBLIC_API(2,0) Invalid_Algorithm_Name final : public Invalid_Argument { explicit Invalid_Algorithm_Name(const std::string& name): Invalid_Argument("Invalid algorithm name: " + name) @@ -176,7 +176,7 @@ struct BOTAN_PUBLIC_API(2,0) Invalid_Algorithm_Name : public Invalid_Argument /** * Encoding_Error Exception */ -struct BOTAN_PUBLIC_API(2,0) Encoding_Error : public Invalid_Argument +struct BOTAN_PUBLIC_API(2,0) Encoding_Error final : public Invalid_Argument { explicit Encoding_Error(const std::string& name) : Invalid_Argument("Encoding error: " + name) {} @@ -194,7 +194,7 @@ struct BOTAN_PUBLIC_API(2,0) Decoding_Error : public Invalid_Argument /** * Integrity_Failure Exception */ -struct BOTAN_PUBLIC_API(2,0) Integrity_Failure : public Exception +struct BOTAN_PUBLIC_API(2,0) Integrity_Failure final : public Exception { explicit Integrity_Failure(const std::string& msg) : Exception("Integrity failure: " + msg) {} @@ -203,7 +203,7 @@ struct BOTAN_PUBLIC_API(2,0) Integrity_Failure : public Exception /** * Invalid_OID Exception */ -struct BOTAN_PUBLIC_API(2,0) Invalid_OID : public Decoding_Error +struct BOTAN_PUBLIC_API(2,0) Invalid_OID final : public Decoding_Error { explicit Invalid_OID(const std::string& oid) : Decoding_Error("Invalid ASN.1 OID: " + oid) {} @@ -212,7 +212,7 @@ struct BOTAN_PUBLIC_API(2,0) Invalid_OID : public Decoding_Error /** * Stream_IO_Error Exception */ -struct BOTAN_PUBLIC_API(2,0) Stream_IO_Error : public Exception +struct BOTAN_PUBLIC_API(2,0) Stream_IO_Error final : public Exception { explicit Stream_IO_Error(const std::string& err) : Exception("I/O error: " + err) @@ -222,7 +222,7 @@ struct BOTAN_PUBLIC_API(2,0) Stream_IO_Error : public Exception /** * No_Filesystem_Access Exception */ -struct BOTAN_PUBLIC_API(2,0) No_Filesystem_Access : public Exception +struct BOTAN_PUBLIC_API(2,0) No_Filesystem_Access final : public Exception { No_Filesystem_Access() : Exception("No filesystem access enabled.") {} }; @@ -230,7 +230,7 @@ struct BOTAN_PUBLIC_API(2,0) No_Filesystem_Access : public Exception /** * Self Test Failure Exception */ -struct BOTAN_PUBLIC_API(2,0) Self_Test_Failure : public Internal_Error +struct BOTAN_PUBLIC_API(2,0) Self_Test_Failure final : public Internal_Error { explicit Self_Test_Failure(const std::string& err) : Internal_Error("Self test failed: " + err) @@ -240,7 +240,7 @@ struct BOTAN_PUBLIC_API(2,0) Self_Test_Failure : public Internal_Error /** * Not Implemented Exception */ -struct BOTAN_PUBLIC_API(2,0) Not_Implemented : public Exception +struct BOTAN_PUBLIC_API(2,0) Not_Implemented final : public Exception { explicit Not_Implemented(const std::string& err) : Exception("Not implemented", err) diff --git a/src/lib/utils/http_util/http_util.h b/src/lib/utils/http_util/http_util.h index acaed54d4..aa8e1cbc0 100644 --- a/src/lib/utils/http_util/http_util.h +++ b/src/lib/utils/http_util/http_util.h @@ -56,7 +56,7 @@ struct Response /** * HTTP_Error Exception */ -struct BOTAN_PUBLIC_API(2,0) HTTP_Error : public Exception +struct BOTAN_PUBLIC_API(2,0) HTTP_Error final : public Exception { explicit HTTP_Error(const std::string& msg) : Exception("HTTP error " + msg) diff --git a/src/lib/utils/locking_allocator/locking_allocator.h b/src/lib/utils/locking_allocator/locking_allocator.h index b761221d2..8e38129e2 100644 --- a/src/lib/utils/locking_allocator/locking_allocator.h +++ b/src/lib/utils/locking_allocator/locking_allocator.h @@ -14,7 +14,7 @@ namespace Botan { -class BOTAN_PUBLIC_API(2,0) mlock_allocator +class BOTAN_PUBLIC_API(2,0) mlock_allocator final { public: static mlock_allocator& instance(); diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp index 92b555d1e..afea8bc7d 100644 --- a/src/lib/utils/os_utils.cpp +++ b/src/lib/utils/os_utils.cpp @@ -52,7 +52,7 @@ namespace { #if defined(BOTAN_HAS_BOOST_ASIO) -class Asio_Socket : public OS::Socket +class Asio_Socket final : public OS::Socket { public: Asio_Socket(const std::string& hostname, const std::string& service) : @@ -90,7 +90,7 @@ class Asio_Socket : public OS::Socket #elif defined(BOTAN_TARGET_OS_TYPE_IS_WINDOWS) -class Winsock_Socket : public OS::Socket +class Winsock_Socket final : public OS::Socket { public: Winsock_Socket(const std::string& hostname, const std::string& service) @@ -188,7 +188,7 @@ class Winsock_Socket : public OS::Socket }; #elif defined(BOTAN_TARGET_OS_TYPE_IS_UNIX) -class BSD_Socket : public OS::Socket +class BSD_Socket final : public OS::Socket { public: BSD_Socket(const std::string& hostname, const std::string& service) diff --git a/src/lib/utils/safeint.h b/src/lib/utils/safeint.h index 66632c932..86567db72 100644 --- a/src/lib/utils/safeint.h +++ b/src/lib/utils/safeint.h @@ -13,7 +13,7 @@ namespace Botan { -class Integer_Overflow_Detected : public Exception +class Integer_Overflow_Detected final : public Exception { public: Integer_Overflow_Detected(const std::string& file, int line) : diff --git a/src/lib/utils/semaphore.h b/src/lib/utils/semaphore.h index 61db8d48f..84478a8df 100644 --- a/src/lib/utils/semaphore.h +++ b/src/lib/utils/semaphore.h @@ -17,7 +17,7 @@ namespace Botan { #if defined(BOTAN_TARGET_OS_HAS_THREADS) -class Semaphore +class Semaphore final { public: explicit Semaphore(int value = 0) : m_value(value), m_wakeups(0) {} diff --git a/src/lib/utils/sqlite3/sqlite3.h b/src/lib/utils/sqlite3/sqlite3.h index dff189791..3f11b60e2 100644 --- a/src/lib/utils/sqlite3/sqlite3.h +++ b/src/lib/utils/sqlite3/sqlite3.h @@ -15,7 +15,7 @@ class sqlite3_stmt; namespace Botan { -class BOTAN_PUBLIC_API(2,0) Sqlite3_Database : public SQL_Database +class BOTAN_PUBLIC_API(2,0) Sqlite3_Database final : public SQL_Database { public: Sqlite3_Database(const std::string& file); @@ -28,7 +28,7 @@ class BOTAN_PUBLIC_API(2,0) Sqlite3_Database : public SQL_Database std::shared_ptr<Statement> new_statement(const std::string& sql) const override; private: - class Sqlite3_Statement : public Statement + class Sqlite3_Statement final : public Statement { public: void bind(int column, const std::string& val) override; diff --git a/src/lib/x509/certstor.h b/src/lib/x509/certstor.h index c2ce8b15b..f08e03bae 100644 --- a/src/lib/x509/certstor.h +++ b/src/lib/x509/certstor.h @@ -71,7 +71,7 @@ class BOTAN_PUBLIC_API(2,0) Certificate_Store /** * In Memory Certificate Store */ -class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_Memory : public Certificate_Store +class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_Memory final : public Certificate_Store { public: /** diff --git a/src/lib/x509/certstor_sqlite3/certstor_sqlite.h b/src/lib/x509/certstor_sqlite3/certstor_sqlite.h index 684ece8d7..4e53f34f4 100644 --- a/src/lib/x509/certstor_sqlite3/certstor_sqlite.h +++ b/src/lib/x509/certstor_sqlite3/certstor_sqlite.h @@ -15,7 +15,7 @@ namespace Botan { /** * Certificate and private key store backed by an sqlite (http://sqlite.org) database. */ -class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_SQLite : public Certificate_Store_In_SQL +class BOTAN_PUBLIC_API(2,0) Certificate_Store_In_SQLite final : public Certificate_Store_In_SQL { public: /** diff --git a/src/lib/x509/name_constraint.h b/src/lib/x509/name_constraint.h index 108028413..34ee5dc32 100644 --- a/src/lib/x509/name_constraint.h +++ b/src/lib/x509/name_constraint.h @@ -25,7 +25,7 @@ class X509_Certificate; * encoding. Allows matching GeneralNames against each other using * the rules laid out in the RFC 5280, sec. 4.2.1.10 (Name Contraints). */ -class BOTAN_PUBLIC_API(2,0) GeneralName : public ASN1_Object +class BOTAN_PUBLIC_API(2,0) GeneralName final : public ASN1_Object { public: enum MatchResult : int @@ -87,7 +87,7 @@ std::ostream& operator<<(std::ostream& os, const GeneralName& gn); * length to a GeneralName to form a constraint. The length limits * are currently unused. */ -class BOTAN_PUBLIC_API(2,0) GeneralSubtree : public ASN1_Object +class BOTAN_PUBLIC_API(2,0) GeneralSubtree final : public ASN1_Object { public: /** @@ -144,7 +144,7 @@ std::ostream& operator<<(std::ostream& os, const GeneralSubtree& gs); * * Wraps the Name Constraints associated with a certificate. */ -class BOTAN_PUBLIC_API(2,0) NameConstraints +class BOTAN_PUBLIC_API(2,0) NameConstraints final { public: /** diff --git a/src/lib/x509/ocsp.h b/src/lib/x509/ocsp.h index 3ff847370..254de5038 100644 --- a/src/lib/x509/ocsp.h +++ b/src/lib/x509/ocsp.h @@ -20,7 +20,7 @@ namespace OCSP { /** * An OCSP request. */ -class BOTAN_PUBLIC_API(2,0) Request +class BOTAN_PUBLIC_API(2,0) Request final { public: /** @@ -66,7 +66,7 @@ class BOTAN_PUBLIC_API(2,0) Request * * Note this class is only usable as an OCSP client */ -class BOTAN_PUBLIC_API(2,0) Response +class BOTAN_PUBLIC_API(2,0) Response final { public: /** diff --git a/src/lib/x509/x509_ca.h b/src/lib/x509/x509_ca.h index d10bdb338..38455923f 100644 --- a/src/lib/x509/x509_ca.h +++ b/src/lib/x509/x509_ca.h @@ -24,7 +24,7 @@ class PK_Signer; /** * This class represents X.509 Certificate Authorities (CAs). */ -class BOTAN_PUBLIC_API(2,0) X509_CA +class BOTAN_PUBLIC_API(2,0) X509_CA final { public: /** diff --git a/src/lib/x509/x509_crl.h b/src/lib/x509/x509_crl.h index 35eded502..0e70b3f2b 100644 --- a/src/lib/x509/x509_crl.h +++ b/src/lib/x509/x509_crl.h @@ -27,7 +27,7 @@ class BOTAN_PUBLIC_API(2,0) X509_CRL final : public X509_Object /** * This class represents CRL related errors. */ - struct BOTAN_PUBLIC_API(2,0) X509_CRL_Error : public Exception + struct BOTAN_PUBLIC_API(2,0) X509_CRL_Error final : public Exception { explicit X509_CRL_Error(const std::string& error) : Exception("X509_CRL: " + error) {} diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp index 203a81cb9..d71af82b7 100644 --- a/src/lib/x509/x509_ext.cpp +++ b/src/lib/x509/x509_ext.cpp @@ -655,7 +655,7 @@ namespace { /* * A policy specifier */ -class Policy_Information : public ASN1_Object +class Policy_Information final : public ASN1_Object { public: Policy_Information() = default; diff --git a/src/lib/x509/x509_ext.h b/src/lib/x509/x509_ext.h index 134c2ec3e..69647616f 100644 --- a/src/lib/x509/x509_ext.h +++ b/src/lib/x509/x509_ext.h @@ -84,7 +84,7 @@ class BOTAN_PUBLIC_API(2,0) Certificate_Extension /** * X.509 Certificate Extension List */ -class BOTAN_PUBLIC_API(2,0) Extensions : public ASN1_Object +class BOTAN_PUBLIC_API(2,0) Extensions final : public ASN1_Object { public: void encode_into(class DER_Encoder&) const override; @@ -307,7 +307,7 @@ class BOTAN_PUBLIC_API(2,0) Alternative_Name : public Certificate_Extension /** * Subject Alternative Name Extension */ -class BOTAN_PUBLIC_API(2,0) Subject_Alternative_Name : public Alternative_Name +class BOTAN_PUBLIC_API(2,0) Subject_Alternative_Name final : public Alternative_Name { public: Subject_Alternative_Name* copy() const override @@ -319,7 +319,7 @@ class BOTAN_PUBLIC_API(2,0) Subject_Alternative_Name : public Alternative_Name /** * Issuer Alternative Name Extension */ -class BOTAN_PUBLIC_API(2,0) Issuer_Alternative_Name : public Alternative_Name +class BOTAN_PUBLIC_API(2,0) Issuer_Alternative_Name final : public Alternative_Name { public: Issuer_Alternative_Name* copy() const override @@ -357,7 +357,7 @@ class BOTAN_PUBLIC_API(2,0) Extended_Key_Usage final : public Certificate_Extens /** * Name Constraints */ -class BOTAN_PUBLIC_API(2,0) Name_Constraints : public Certificate_Extension +class BOTAN_PUBLIC_API(2,0) Name_Constraints final : public Certificate_Extension { public: Name_Constraints* copy() const override diff --git a/src/lib/x509/x509path.h b/src/lib/x509/x509path.h index 9a7f9542f..2bddd62b1 100644 --- a/src/lib/x509/x509path.h +++ b/src/lib/x509/x509path.h @@ -31,7 +31,7 @@ typedef std::vector<std::set<Certificate_Status_Code>> CertificatePathStatusCode /** * Specifies restrictions on the PKIX path validation */ -class BOTAN_PUBLIC_API(2,0) Path_Validation_Restrictions +class BOTAN_PUBLIC_API(2,0) Path_Validation_Restrictions final { public: /** @@ -107,7 +107,7 @@ class BOTAN_PUBLIC_API(2,0) Path_Validation_Restrictions /** * Represents the result of a PKIX path validation */ -class BOTAN_PUBLIC_API(2,0) Path_Validation_Result +class BOTAN_PUBLIC_API(2,0) Path_Validation_Result final { public: typedef Certificate_Status_Code Code; diff --git a/src/lib/x509/x509self.h b/src/lib/x509/x509self.h index b39f8bdd1..ebbfe66f2 100644 --- a/src/lib/x509/x509self.h +++ b/src/lib/x509/x509self.h @@ -18,7 +18,7 @@ namespace Botan { /** * Options for X.509 certificates. */ -class BOTAN_PUBLIC_API(2,0) X509_Cert_Options +class BOTAN_PUBLIC_API(2,0) X509_Cert_Options final { public: /** |