diff options
author | Jack Lloyd <[email protected]> | 2017-09-22 10:56:25 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-22 10:56:25 -0400 |
commit | 2610d170e73b3e1f94c35de75f6c25cea52ef7d5 (patch) | |
tree | 9c60bb607340eb79dace57184ed67145a478cfa4 /src | |
parent | dc24f117eca49214d45582c83d2b8ddcc2c81704 (diff) |
Add final annotations as appropriate in the test code
Diffstat (limited to 'src')
72 files changed, 155 insertions, 155 deletions
diff --git a/src/tests/main.cpp b/src/tests/main.cpp index f96f431a7..891f71304 100644 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -40,7 +40,7 @@ namespace { -class Test_Runner : public Botan_CLI::Command +class Test_Runner final : public Botan_CLI::Command { public: Test_Runner() @@ -217,7 +217,7 @@ class Test_Runner : public Botan_CLI::Command rng.reset(new Botan::Serialized_RNG(new Botan::AutoSeeded_RNG)); #else // last ditch fallback for RNG-less build - class Bogus_Fallback_RNG : public Botan::RandomNumberGenerator + class Bogus_Fallback_RNG final : public Botan::RandomNumberGenerator { public: std::string name() const override diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp index f4da3ca57..e59c35a11 100644 --- a/src/tests/test_aead.cpp +++ b/src/tests/test_aead.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_AEAD_MODES) -class AEAD_Tests : public Text_Based_Test +class AEAD_Tests final : public Text_Based_Test { public: AEAD_Tests() : Text_Based_Test("aead", "Key,Nonce,In,Out", "AD") {} diff --git a/src/tests/test_asn1.cpp b/src/tests/test_asn1.cpp index 3427d391d..5c54f2bb4 100644 --- a/src/tests/test_asn1.cpp +++ b/src/tests/test_asn1.cpp @@ -46,7 +46,7 @@ Test::Result test_ber_stack_recursion() } -class ASN1_Tests : public Test +class ASN1_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp index 7692aecea..6151d72de 100644 --- a/src/tests/test_bigint.cpp +++ b/src/tests/test_bigint.cpp @@ -21,7 +21,7 @@ namespace { using Botan::BigInt; -class BigInt_Unit_Tests : public Test +class BigInt_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override @@ -255,7 +255,7 @@ class BigInt_Unit_Tests : public Test BOTAN_REGISTER_TEST("bigint_unit", BigInt_Unit_Tests); -class BigInt_Add_Test : public Text_Based_Test +class BigInt_Add_Test final : public Text_Based_Test { public: BigInt_Add_Test() : Text_Based_Test("bn/add.vec", "In1,In2,Output") {} @@ -289,7 +289,7 @@ class BigInt_Add_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_add", BigInt_Add_Test); -class BigInt_Sub_Test : public Text_Based_Test +class BigInt_Sub_Test final : public Text_Based_Test { public: BigInt_Sub_Test() : Text_Based_Test("bn/sub.vec", "In1,In2,Output") {} @@ -316,7 +316,7 @@ class BigInt_Sub_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_sub", BigInt_Sub_Test); -class BigInt_Mul_Test : public Text_Based_Test +class BigInt_Mul_Test final : public Text_Based_Test { public: BigInt_Mul_Test() : Text_Based_Test("bn/mul.vec", "In1,In2,Output") {} @@ -346,7 +346,7 @@ class BigInt_Mul_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_mul", BigInt_Mul_Test); -class BigInt_Sqr_Test : public Text_Based_Test +class BigInt_Sqr_Test final : public Text_Based_Test { public: BigInt_Sqr_Test() : Text_Based_Test("bn/sqr.vec", "Input,Output") {} @@ -367,7 +367,7 @@ class BigInt_Sqr_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_sqr", BigInt_Sqr_Test); -class BigInt_Div_Test : public Text_Based_Test +class BigInt_Div_Test final : public Text_Based_Test { public: BigInt_Div_Test() : Text_Based_Test("bn/divide.vec", "In1,In2,Output") {} @@ -392,7 +392,7 @@ class BigInt_Div_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_div", BigInt_Div_Test); -class BigInt_Mod_Test : public Text_Based_Test +class BigInt_Mod_Test final : public Text_Based_Test { public: BigInt_Mod_Test() : Text_Based_Test("bn/mod.vec", "In1,In2,Output") {} @@ -426,7 +426,7 @@ class BigInt_Mod_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_mod", BigInt_Mod_Test); -class BigInt_Lshift_Test : public Text_Based_Test +class BigInt_Lshift_Test final : public Text_Based_Test { public: BigInt_Lshift_Test() : Text_Based_Test("bn/lshift.vec", "Value,Shift,Output") {} @@ -451,7 +451,7 @@ class BigInt_Lshift_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_lshift", BigInt_Lshift_Test); -class BigInt_Rshift_Test : public Text_Based_Test +class BigInt_Rshift_Test final : public Text_Based_Test { public: BigInt_Rshift_Test() : Text_Based_Test("bn/rshift.vec", "Value,Shift,Output") {} @@ -476,7 +476,7 @@ class BigInt_Rshift_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_rshift", BigInt_Rshift_Test); -class BigInt_Powmod_Test : public Text_Based_Test +class BigInt_Powmod_Test final : public Text_Based_Test { public: BigInt_Powmod_Test() : Text_Based_Test("bn/powmod.vec", "Base,Exponent,Modulus,Output") {} @@ -529,7 +529,7 @@ class BigInt_Powmod_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_powmod", BigInt_Powmod_Test); -class BigInt_IsPrime_Test : public Text_Based_Test +class BigInt_IsPrime_Test final : public Text_Based_Test { public: BigInt_IsPrime_Test() : Text_Based_Test("bn/isprime.vec", "X") {} @@ -552,7 +552,7 @@ class BigInt_IsPrime_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_isprime", BigInt_IsPrime_Test); -class BigInt_Ressol_Test : public Text_Based_Test +class BigInt_Ressol_Test final : public Text_Based_Test { public: BigInt_Ressol_Test() : Text_Based_Test("bn/ressol.vec", "Input,Modulus,Output") {} @@ -581,7 +581,7 @@ class BigInt_Ressol_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_ressol", BigInt_Ressol_Test); -class BigInt_InvMod_Test : public Text_Based_Test +class BigInt_InvMod_Test final : public Text_Based_Test { public: BigInt_InvMod_Test() : Text_Based_Test("bn/invmod.vec", "Input,Modulus,Output") {} @@ -623,7 +623,7 @@ class BigInt_InvMod_Test : public Text_Based_Test BOTAN_REGISTER_TEST("bn_invmod", BigInt_InvMod_Test); -class DSA_ParamGen_Test : public Text_Based_Test +class DSA_ParamGen_Test final : public Text_Based_Test { public: DSA_ParamGen_Test() : Text_Based_Test("bn/dsa_gen.vec", "P,Q,Counter,Seed") {} diff --git a/src/tests/test_block.cpp b/src/tests/test_block.cpp index 16f83a1cb..535556a90 100644 --- a/src/tests/test_block.cpp +++ b/src/tests/test_block.cpp @@ -9,7 +9,7 @@ namespace Botan_Tests { -class Block_Cipher_Tests : public Text_Based_Test +class Block_Cipher_Tests final : public Text_Based_Test { public: Block_Cipher_Tests() : Text_Based_Test("block", "Key,In,Out", "Iterations") {} diff --git a/src/tests/test_c25519.cpp b/src/tests/test_c25519.cpp index deccc88b3..ccc84a4b0 100644 --- a/src/tests/test_c25519.cpp +++ b/src/tests/test_c25519.cpp @@ -17,7 +17,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_CURVE_25519) -class Curve25519_Sclarmult_Tests : public Text_Based_Test +class Curve25519_Sclarmult_Tests final : public Text_Based_Test { public: Curve25519_Sclarmult_Tests() : Text_Based_Test( @@ -39,7 +39,7 @@ class Curve25519_Sclarmult_Tests : public Text_Based_Test } }; -class Curve25519_Roundtrip_Test : public Test +class Curve25519_Roundtrip_Test final : public Test { public: std::vector<Test::Result> run() override @@ -108,7 +108,7 @@ class Curve25519_Roundtrip_Test : public Test } }; -class Curve25519_Keygen_Tests : public PK_Key_Generation_Test +class Curve25519_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_certstor.cpp b/src/tests/test_certstor.cpp index bbf23da6c..24b905cfd 100644 --- a/src/tests/test_certstor.cpp +++ b/src/tests/test_certstor.cpp @@ -260,7 +260,7 @@ Test::Result test_certstor_find_hash_subject(const std::vector<CertificateAndKey } } -class Certstor_Tests : public Test +class Certstor_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_compression.cpp b/src/tests/test_compression.cpp index 355ee0b2a..10e93eb79 100644 --- a/src/tests/test_compression.cpp +++ b/src/tests/test_compression.cpp @@ -52,7 +52,7 @@ const char* text_str = "All mimsy were the borogoves," "And the mome raths outgrabe."; -class Compression_Tests : public Test +class Compression_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_cryptobox.cpp b/src/tests/test_cryptobox.cpp index 97ac69f65..a45c2cfef 100644 --- a/src/tests/test_cryptobox.cpp +++ b/src/tests/test_cryptobox.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_CRYPTO_BOX) -class Cryptobox_Tests : public Test +class Cryptobox_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_dh.cpp b/src/tests/test_dh.cpp index 028a4d1cc..e525e57e0 100644 --- a/src/tests/test_dh.cpp +++ b/src/tests/test_dh.cpp @@ -18,7 +18,7 @@ namespace { #if defined(BOTAN_HAS_DIFFIE_HELLMAN) -class Diffie_Hellman_KAT_Tests : public PK_Key_Agreement_Test +class Diffie_Hellman_KAT_Tests final : public PK_Key_Agreement_Test { public: Diffie_Hellman_KAT_Tests() @@ -111,7 +111,7 @@ class Diffie_Hellman_KAT_Tests : public PK_Key_Agreement_Test }; -class DH_Invalid_Key_Tests : public Text_Based_Test +class DH_Invalid_Key_Tests final : public Text_Based_Test { public: DH_Invalid_Key_Tests() : @@ -138,7 +138,7 @@ class DH_Invalid_Key_Tests : public Text_Based_Test } }; -class Diffie_Hellman_Keygen_Tests : public PK_Key_Generation_Test +class Diffie_Hellman_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_dl_group.cpp b/src/tests/test_dl_group.cpp index 40615d840..baa2fdc9d 100644 --- a/src/tests/test_dl_group.cpp +++ b/src/tests/test_dl_group.cpp @@ -16,7 +16,7 @@ namespace Botan_Tests { namespace { -class DL_Group_Tests : public Test +class DL_Group_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_dlies.cpp b/src/tests/test_dlies.cpp index 42ee0b55f..446470fe6 100644 --- a/src/tests/test_dlies.cpp +++ b/src/tests/test_dlies.cpp @@ -19,7 +19,7 @@ namespace { #if defined(BOTAN_HAS_DLIES) && defined(BOTAN_HAS_DIFFIE_HELLMAN) -class DLIES_KAT_Tests : public Text_Based_Test +class DLIES_KAT_Tests final : public Text_Based_Test { public: DLIES_KAT_Tests() @@ -164,7 +164,7 @@ Test::Result test_xor() return result; } -class DLIES_Unit_Tests : public Test +class DLIES_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_dsa.cpp b/src/tests/test_dsa.cpp index b5ade8145..9038740f2 100644 --- a/src/tests/test_dsa.cpp +++ b/src/tests/test_dsa.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_DSA) -class DSA_KAT_Tests : public PK_Signature_Generation_Test +class DSA_KAT_Tests final : public PK_Signature_Generation_Test { public: DSA_KAT_Tests() : PK_Signature_Generation_Test( @@ -55,7 +55,7 @@ class DSA_KAT_Tests : public PK_Signature_Generation_Test } }; -class DSA_Keygen_Tests : public PK_Key_Generation_Test +class DSA_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_ecc_pointmul.cpp b/src/tests/test_ecc_pointmul.cpp index a1117a3d3..6ee0034a0 100644 --- a/src/tests/test_ecc_pointmul.cpp +++ b/src/tests/test_ecc_pointmul.cpp @@ -16,7 +16,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_ECDSA) -class ECC_Pointmult_Tests : public Text_Based_Test +class ECC_Pointmult_Tests final : public Text_Based_Test { public: ECC_Pointmult_Tests() : Text_Based_Test("pubkey/ecc.vec", "m,X,Y") {} diff --git a/src/tests/test_ecdh.cpp b/src/tests/test_ecdh.cpp index 73622d015..7ea19eb53 100644 --- a/src/tests/test_ecdh.cpp +++ b/src/tests/test_ecdh.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_ECDH) -class ECDH_KAT_Tests : public PK_Key_Agreement_Test +class ECDH_KAT_Tests final : public PK_Key_Agreement_Test { public: ECDH_KAT_Tests() @@ -47,7 +47,7 @@ class ECDH_KAT_Tests : public PK_Key_Agreement_Test } }; -class ECDH_Keygen_Tests : public PK_Key_Generation_Test +class ECDH_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_ecdsa.cpp b/src/tests/test_ecdsa.cpp index 5d9c327a8..36ca72942 100644 --- a/src/tests/test_ecdsa.cpp +++ b/src/tests/test_ecdsa.cpp @@ -21,7 +21,7 @@ namespace { #if defined(BOTAN_HAS_ECDSA) -class ECDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test +class ECDSA_Signature_KAT_Tests final : public PK_Signature_Generation_Test { public: ECDSA_Signature_KAT_Tests() : PK_Signature_Generation_Test( @@ -67,7 +67,7 @@ class ECDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test #endif }; -class ECDSA_Keygen_Tests : public PK_Key_Generation_Test +class ECDSA_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override @@ -80,7 +80,7 @@ class ECDSA_Keygen_Tests : public PK_Key_Generation_Test } }; -class ECDSA_Invalid_Key_Tests : public Text_Based_Test +class ECDSA_Invalid_Key_Tests final : public Text_Based_Test { public: ECDSA_Invalid_Key_Tests() : diff --git a/src/tests/test_ecgdsa.cpp b/src/tests/test_ecgdsa.cpp index 25e4be0e2..325c53b55 100644 --- a/src/tests/test_ecgdsa.cpp +++ b/src/tests/test_ecgdsa.cpp @@ -20,7 +20,7 @@ namespace { #if defined(BOTAN_HAS_ECGDSA) -class ECGDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test +class ECGDSA_Signature_KAT_Tests final : public PK_Signature_Generation_Test { public: ECGDSA_Signature_KAT_Tests() : PK_Signature_Generation_Test( @@ -56,7 +56,7 @@ class ECGDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test } }; -class ECGDSA_Keygen_Tests : public PK_Key_Generation_Test +class ECGDSA_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_ecies.cpp b/src/tests/test_ecies.cpp index a35725d62..6a4bcfeb0 100644 --- a/src/tests/test_ecies.cpp +++ b/src/tests/test_ecies.cpp @@ -100,7 +100,7 @@ void check_encrypt_decrypt(Test::Result& result, const Botan::ECDH_PrivateKey& p #if defined(BOTAN_HAS_KDF1_18033) && defined(BOTAN_HAS_SHA1) -class ECIES_ISO_Tests : public Text_Based_Test +class ECIES_ISO_Tests final : public Text_Based_Test { public: ECIES_ISO_Tests() : Text_Based_Test( @@ -199,7 +199,7 @@ BOTAN_REGISTER_TEST("ecies_iso", ECIES_ISO_Tests); #endif -class ECIES_Tests : public Text_Based_Test +class ECIES_Tests final : public Text_Based_Test { public: ECIES_Tests() @@ -416,7 +416,7 @@ Test::Result test_ciphertext_too_short() return result; } -class ECIES_Unit_Tests : public Test +class ECIES_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_eckcdsa.cpp b/src/tests/test_eckcdsa.cpp index 62adb8599..f32ef92db 100644 --- a/src/tests/test_eckcdsa.cpp +++ b/src/tests/test_eckcdsa.cpp @@ -20,7 +20,7 @@ namespace { #if defined(BOTAN_HAS_ECKCDSA) -class ECKCDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test +class ECKCDSA_Signature_KAT_Tests final : public PK_Signature_Generation_Test { public: ECKCDSA_Signature_KAT_Tests() @@ -57,7 +57,7 @@ class ECKCDSA_Signature_KAT_Tests : public PK_Signature_Generation_Test } }; -class ECKCDSA_Keygen_Tests : public PK_Key_Generation_Test +class ECKCDSA_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_ed25519.cpp b/src/tests/test_ed25519.cpp index 7cef95a48..b38fd73e1 100644 --- a/src/tests/test_ed25519.cpp +++ b/src/tests/test_ed25519.cpp @@ -19,7 +19,7 @@ namespace { #if defined(BOTAN_HAS_ED25519) -class Ed25519_Signature_Tests : public PK_Signature_Generation_Test +class Ed25519_Signature_Tests final : public PK_Signature_Generation_Test { public: Ed25519_Signature_Tests() : PK_Signature_Generation_Test( @@ -48,7 +48,7 @@ class Ed25519_Signature_Tests : public PK_Signature_Generation_Test } }; -class Ed25519_Curdle_Format_Tests : public Test +class Ed25519_Curdle_Format_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_elg.cpp b/src/tests/test_elg.cpp index 9d024cb5a..ffa58f74f 100644 --- a/src/tests/test_elg.cpp +++ b/src/tests/test_elg.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_ELGAMAL) -class ElGamal_KAT_Tests : public PK_Encryption_Decryption_Test +class ElGamal_KAT_Tests final : public PK_Encryption_Decryption_Test { public: ElGamal_KAT_Tests() @@ -40,7 +40,7 @@ class ElGamal_KAT_Tests : public PK_Encryption_Decryption_Test } }; -class ElGamal_Keygen_Tests : public PK_Key_Generation_Test +class ElGamal_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_entropy.cpp b/src/tests/test_entropy.cpp index 232b30d7d..745130c62 100644 --- a/src/tests/test_entropy.cpp +++ b/src/tests/test_entropy.cpp @@ -16,7 +16,7 @@ namespace Botan_Tests { namespace { -class Entropy_Source_Tests : public Test +class Entropy_Source_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index bc3e72b09..34127893d 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -29,7 +29,7 @@ namespace { return result; \ } -class FFI_Unit_Tests : public Test +class FFI_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_filters.cpp b/src/tests/test_filters.cpp index fdadbb6c6..877a5e222 100644 --- a/src/tests/test_filters.cpp +++ b/src/tests/test_filters.cpp @@ -32,7 +32,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_FILTERS) -class Filter_Tests : public Test +class Filter_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_fpe.cpp b/src/tests/test_fpe.cpp index 47070de86..e0cc1de01 100644 --- a/src/tests/test_fpe.cpp +++ b/src/tests/test_fpe.cpp @@ -14,7 +14,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_FPE_FE1) -class FPE_FE1_Tests : public Text_Based_Test +class FPE_FE1_Tests final : public Text_Based_Test { public: FPE_FE1_Tests() : Text_Based_Test("fpe_fe1.vec", "Mod,In,Out,Key,Tweak") {} diff --git a/src/tests/test_gf2m.cpp b/src/tests/test_gf2m.cpp index d85f72e2e..af2798352 100644 --- a/src/tests/test_gf2m.cpp +++ b/src/tests/test_gf2m.cpp @@ -16,7 +16,7 @@ namespace { #if defined(BOTAN_HAS_MCELIECE) -class GF2m_Tests : public Test +class GF2m_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_gost_3410.cpp b/src/tests/test_gost_3410.cpp index bc036e037..a1443a7ae 100644 --- a/src/tests/test_gost_3410.cpp +++ b/src/tests/test_gost_3410.cpp @@ -18,7 +18,7 @@ namespace { #if defined(BOTAN_HAS_GOST_34_10_2001) -class GOST_3410_2001_Verification_Tests : public PK_Signature_Verification_Test +class GOST_3410_2001_Verification_Tests final : public PK_Signature_Verification_Test { public: GOST_3410_2001_Verification_Tests() : PK_Signature_Verification_Test( @@ -42,7 +42,7 @@ class GOST_3410_2001_Verification_Tests : public PK_Signature_Verification_Test } }; -class GOST_3410_2001_Signature_Tests : public PK_Signature_Generation_Test +class GOST_3410_2001_Signature_Tests final : public PK_Signature_Generation_Test { public: GOST_3410_2001_Signature_Tests() : PK_Signature_Generation_Test( @@ -71,7 +71,7 @@ class GOST_3410_2001_Signature_Tests : public PK_Signature_Generation_Test } }; -class GOST_3410_2001_Keygen_Tests : public PK_Key_Generation_Test +class GOST_3410_2001_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/test_hash.cpp b/src/tests/test_hash.cpp index 9ac3e7d4e..2116cade4 100644 --- a/src/tests/test_hash.cpp +++ b/src/tests/test_hash.cpp @@ -12,7 +12,7 @@ namespace Botan_Tests { namespace { -class Hash_Function_Tests : public Text_Based_Test +class Hash_Function_Tests final : public Text_Based_Test { public: Hash_Function_Tests() : Text_Based_Test("hash", "In,Out") {} diff --git a/src/tests/test_kdf.cpp b/src/tests/test_kdf.cpp index ef0d71fbb..775f5b5ac 100644 --- a/src/tests/test_kdf.cpp +++ b/src/tests/test_kdf.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_KDF_BASE) -class KDF_KAT_Tests : public Text_Based_Test +class KDF_KAT_Tests final : public Text_Based_Test { public: KDF_KAT_Tests() : Text_Based_Test("kdf", "OutputLen,Salt,Secret,Label,Output", "IKM,XTS") {} diff --git a/src/tests/test_keywrap.cpp b/src/tests/test_keywrap.cpp index 05e9cea01..d710dfc68 100644 --- a/src/tests/test_keywrap.cpp +++ b/src/tests/test_keywrap.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_RFC3394_KEYWRAP) -class RFC3394_Keywrap_Tests : public Text_Based_Test +class RFC3394_Keywrap_Tests final : public Text_Based_Test { public: RFC3394_Keywrap_Tests() : Text_Based_Test("rfc3394.vec", "Key,KEK,Output") {} diff --git a/src/tests/test_mac.cpp b/src/tests/test_mac.cpp index fd1c920ec..471a15fed 100644 --- a/src/tests/test_mac.cpp +++ b/src/tests/test_mac.cpp @@ -17,7 +17,7 @@ namespace { #if defined(BOTAN_HAS_MAC) -class Message_Auth_Tests : public Text_Based_Test +class Message_Auth_Tests final : public Text_Based_Test { public: Message_Auth_Tests() : Text_Based_Test("mac", "Key,In,Out", "IV") {} diff --git a/src/tests/test_mceliece.cpp b/src/tests/test_mceliece.cpp index 821a80f12..7f27e844b 100644 --- a/src/tests/test_mceliece.cpp +++ b/src/tests/test_mceliece.cpp @@ -33,7 +33,7 @@ namespace { #if defined(BOTAN_HAS_MCELIECE) #if defined(BOTAN_HAS_HMAC_DRBG) -class McEliece_Keygen_Encrypt_Test : public Text_Based_Test +class McEliece_Keygen_Encrypt_Test final : public Text_Based_Test { public: McEliece_Keygen_Encrypt_Test() @@ -117,7 +117,7 @@ class McEliece_Keygen_Encrypt_Test : public Text_Based_Test BOTAN_REGISTER_TEST("mce_keygen", McEliece_Keygen_Encrypt_Test); #endif -class McEliece_Tests : public Test +class McEliece_Tests final : public Test { public: diff --git a/src/tests/test_modes.cpp b/src/tests/test_modes.cpp index f6cb8890b..74e1b3da3 100644 --- a/src/tests/test_modes.cpp +++ b/src/tests/test_modes.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_MODES) -class Cipher_Mode_Tests : public Text_Based_Test +class Cipher_Mode_Tests final : public Text_Based_Test { public: Cipher_Mode_Tests() @@ -151,7 +151,7 @@ class Cipher_Mode_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("modes", Cipher_Mode_Tests); -class Cipher_Mode_IV_Carry_Tests : public Test +class Cipher_Mode_IV_Carry_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_mp.cpp b/src/tests/test_mp.cpp index 16ca8b4ab..8372e7e5c 100644 --- a/src/tests/test_mp.cpp +++ b/src/tests/test_mp.cpp @@ -16,7 +16,7 @@ namespace { #if defined(BOTAN_HAS_BIGINT_MP) -class MP_Unit_Tests : public Test +class MP_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_name_constraint.cpp b/src/tests/test_name_constraint.cpp index 96d7bee00..46ebaa466 100644 --- a/src/tests/test_name_constraint.cpp +++ b/src/tests/test_name_constraint.cpp @@ -19,7 +19,7 @@ namespace { #if defined(BOTAN_HAS_X509_CERTIFICATES) -class Name_Constraint_Tests : public Test +class Name_Constraint_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_newhope.cpp b/src/tests/test_newhope.cpp index 112b1f4a7..171ddd22e 100644 --- a/src/tests/test_newhope.cpp +++ b/src/tests/test_newhope.cpp @@ -17,7 +17,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_NEWHOPE) && defined(BOTAN_HAS_CHACHA) -class NEWHOPE_RNG : public Botan::RandomNumberGenerator +class NEWHOPE_RNG final : public Botan::RandomNumberGenerator { public: std::string name() const override @@ -100,7 +100,7 @@ class NEWHOPE_RNG : public Botan::RandomNumberGenerator uint8_t m_calls = 0; }; -class NEWHOPE_Tests : public Text_Based_Test +class NEWHOPE_Tests final : public Text_Based_Test { public: NEWHOPE_Tests() diff --git a/src/tests/test_ocb.cpp b/src/tests/test_ocb.cpp index 61d77144b..177365409 100644 --- a/src/tests/test_ocb.cpp +++ b/src/tests/test_ocb.cpp @@ -21,7 +21,7 @@ namespace { // Toy cipher used for wide block tests -class OCB_Wide_Test_Block_Cipher : public Botan::BlockCipher +class OCB_Wide_Test_Block_Cipher final : public Botan::BlockCipher { public: OCB_Wide_Test_Block_Cipher(size_t bs) : m_bs(bs) {} @@ -110,7 +110,7 @@ class OCB_Wide_Test_Block_Cipher : public Botan::BlockCipher std::vector<uint8_t> m_key; }; -class OCB_Wide_KAT_Tests : public Text_Based_Test +class OCB_Wide_KAT_Tests final : public Text_Based_Test { public: OCB_Wide_KAT_Tests() @@ -149,7 +149,7 @@ class OCB_Wide_KAT_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("ocb_wide", OCB_Wide_KAT_Tests); -class OCB_Wide_Long_KAT_Tests : public Text_Based_Test +class OCB_Wide_Long_KAT_Tests final : public Text_Based_Test { public: OCB_Wide_Long_KAT_Tests() @@ -258,7 +258,7 @@ class OCB_Wide_Long_KAT_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("ocb_long_wide", OCB_Wide_Long_KAT_Tests); -class OCB_Long_KAT_Tests : public Text_Based_Test +class OCB_Long_KAT_Tests final : public Text_Based_Test { public: OCB_Long_KAT_Tests() diff --git a/src/tests/test_ocsp.cpp b/src/tests/test_ocsp.cpp index e88fad0b4..542b4b575 100644 --- a/src/tests/test_ocsp.cpp +++ b/src/tests/test_ocsp.cpp @@ -17,7 +17,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_OCSP) -class OCSP_Tests : public Test +class OCSP_Tests final : public Test { private: std::vector<uint8_t> slurp_data_file(const std::string& path) diff --git a/src/tests/test_octetstring.cpp b/src/tests/test_octetstring.cpp index ff9e179ac..1010b5464 100644 --- a/src/tests/test_octetstring.cpp +++ b/src/tests/test_octetstring.cpp @@ -124,7 +124,7 @@ Test::Result test_append() return result; } -class OctetString_Tests : public Test +class OctetString_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_os_utils.cpp b/src/tests/test_os_utils.cpp index 881f65a56..d06f5dbb1 100644 --- a/src/tests/test_os_utils.cpp +++ b/src/tests/test_os_utils.cpp @@ -28,7 +28,7 @@ void free_locked_pages(void* ptr, size_t length); int run_cpu_instruction_probe(std::function<int ()> probe_fn); */ -class OS_Utils_Tests : public Test +class OS_Utils_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_otp.cpp b/src/tests/test_otp.cpp index 12295c96c..dfe01aa93 100644 --- a/src/tests/test_otp.cpp +++ b/src/tests/test_otp.cpp @@ -21,7 +21,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_HOTP) -class HOTP_KAT_Tests : public Text_Based_Test +class HOTP_KAT_Tests final : public Text_Based_Test { public: HOTP_KAT_Tests() @@ -72,7 +72,7 @@ BOTAN_REGISTER_TEST("otp_hotp", HOTP_KAT_Tests); #if defined(BOTAN_HAS_TOTP) -class TOTP_KAT_Tests : public Text_Based_Test +class TOTP_KAT_Tests final : public Text_Based_Test { public: TOTP_KAT_Tests() diff --git a/src/tests/test_package_transform.cpp b/src/tests/test_package_transform.cpp index 08eec51af..97027d936 100644 --- a/src/tests/test_package_transform.cpp +++ b/src/tests/test_package_transform.cpp @@ -16,7 +16,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_PACKAGE_TRANSFORM) -class Package_Transform_Tests : public Test +class Package_Transform_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_pad.cpp b/src/tests/test_pad.cpp index 592ae660b..2cf914600 100644 --- a/src/tests/test_pad.cpp +++ b/src/tests/test_pad.cpp @@ -14,7 +14,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_CIPHER_MODE_PADDING) -class Cipher_Mode_Padding_Tests : public Text_Based_Test +class Cipher_Mode_Padding_Tests final : public Text_Based_Test { public: Cipher_Mode_Padding_Tests() : Text_Based_Test("pad.vec", "In,Blocksize", "Out") {} diff --git a/src/tests/test_passhash.cpp b/src/tests/test_passhash.cpp index 21085ff34..1519506ef 100644 --- a/src/tests/test_passhash.cpp +++ b/src/tests/test_passhash.cpp @@ -19,7 +19,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_BCRYPT) -class Bcrypt_Tests : public Text_Based_Test +class Bcrypt_Tests final : public Text_Based_Test { public: Bcrypt_Tests() : Text_Based_Test("bcrypt.vec", "Password,Passhash") {} @@ -73,7 +73,7 @@ BOTAN_REGISTER_TEST("bcrypt", Bcrypt_Tests); #endif #if defined(BOTAN_HAS_PASSHASH9) -class Passhash9_Tests : public Text_Based_Test +class Passhash9_Tests final : public Text_Based_Test { public: Passhash9_Tests() : Text_Based_Test("passhash9.vec", "Password,Passhash,PRF") {} diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp index fd13085d7..37d3c3125 100644 --- a/src/tests/test_pbkdf.cpp +++ b/src/tests/test_pbkdf.cpp @@ -19,7 +19,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_PBKDF) -class PBKDF_KAT_Tests : public Text_Based_Test +class PBKDF_KAT_Tests final : public Text_Based_Test { public: PBKDF_KAT_Tests() : Text_Based_Test("pbkdf", "Iterations,Salt,Passphrase,Output", "OutputLen") {} @@ -59,7 +59,7 @@ BOTAN_REGISTER_TEST("pbkdf", PBKDF_KAT_Tests); #if defined(BOTAN_HAS_PGP_S2K) -class PGP_S2K_Iter_Test : public Test +class PGP_S2K_Iter_Test final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_pk_pad.cpp b/src/tests/test_pk_pad.cpp index f802bf048..bd33dde6c 100644 --- a/src/tests/test_pk_pad.cpp +++ b/src/tests/test_pk_pad.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_PK_PADDING) -class EME_Decoding_Tests : public Text_Based_Test +class EME_Decoding_Tests final : public Text_Based_Test { public: EME_Decoding_Tests() diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp index 069aba5cb..6cb7a2724 100644 --- a/src/tests/test_pkcs11_high_level.cpp +++ b/src/tests/test_pkcs11_high_level.cpp @@ -144,7 +144,7 @@ Test::Result test_module_get_info() return result; } -class Module_Tests : public PKCS11_Test +class Module_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -282,7 +282,7 @@ Test::Result test_get_mechanisms_info() return result; } -class Slot_Tests : public PKCS11_Test +class Slot_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -417,7 +417,7 @@ Test::Result test_session_info() return result; } -class Session_Tests : public PKCS11_Test +class Session_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -613,7 +613,7 @@ Test::Result test_object_copy() } #endif -class Object_Tests : public PKCS11_Test +class Object_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -877,7 +877,7 @@ Test::Result test_rsa_sign_verify() return result; } -class PKCS11_RSA_Tests : public PKCS11_Test +class PKCS11_RSA_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -1120,7 +1120,7 @@ Test::Result test_ecdsa_sign_verify() return result; } -class PKCS11_ECDSA_Tests : public PKCS11_Test +class PKCS11_ECDSA_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -1346,7 +1346,7 @@ Test::Result test_ecdh_derive() return result; } -class PKCS11_ECDH_Tests : public PKCS11_Test +class PKCS11_ECDH_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -1427,7 +1427,7 @@ Test::Result test_pkcs11_hmac_drbg() } #endif -class PKCS11_RNG_Tests : public PKCS11_Test +class PKCS11_RNG_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -1514,7 +1514,7 @@ Test::Result test_change_so_pin() return result; } -class PKCS11_Token_Management_Tests : public PKCS11_Test +class PKCS11_Token_Management_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override @@ -1560,7 +1560,7 @@ Test::Result test_x509_import() return result; } -class PKCS11_X509_Tests : public PKCS11_Test +class PKCS11_X509_Tests final : public PKCS11_Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_pkcs11_low_level.cpp b/src/tests/test_pkcs11_low_level.cpp index 04659e6f6..930a9ea01 100644 --- a/src/tests/test_pkcs11_low_level.cpp +++ b/src/tests/test_pkcs11_low_level.cpp @@ -788,7 +788,7 @@ Test::Result test_c_copy_object() return result; } -class LowLevelTests : public Test +class LowLevelTests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_rfc6979.cpp b/src/tests/test_rfc6979.cpp index 9dcba0f40..8b8af434f 100644 --- a/src/tests/test_rfc6979.cpp +++ b/src/tests/test_rfc6979.cpp @@ -18,7 +18,7 @@ namespace { #if defined(BOTAN_HAS_RFC6979_GENERATOR) -class RFC6979_KAT_Tests : public Text_Based_Test +class RFC6979_KAT_Tests final : public Text_Based_Test { public: RFC6979_KAT_Tests() : Text_Based_Test("rfc6979.vec", "Q,X,H,K") {} diff --git a/src/tests/test_rng.cpp b/src/tests/test_rng.cpp index c47680bb8..82804d1b9 100644 --- a/src/tests/test_rng.cpp +++ b/src/tests/test_rng.cpp @@ -136,7 +136,7 @@ class Stateful_RNG_Tests : public Test { Test::Result result(rng_name() + " Broken Entropy Input"); - class Broken_Entropy_Source : public Botan::Entropy_Source + class Broken_Entropy_Source final : public Botan::Entropy_Source { public: std::string name() const override @@ -150,7 +150,7 @@ class Stateful_RNG_Tests : public Test } }; - class Insufficient_Entropy_Source : public Botan::Entropy_Source + class Insufficient_Entropy_Source final : public Botan::Entropy_Source { public: std::string name() const override @@ -397,7 +397,7 @@ class Stateful_RNG_Tests : public Test #if defined(BOTAN_HAS_HMAC_DRBG) && defined(BOTAN_HAS_SHA2_32) -class HMAC_DRBG_Unit_Tests : public Stateful_RNG_Tests +class HMAC_DRBG_Unit_Tests final : public Stateful_RNG_Tests { public: std::string rng_name() const override { return "HMAC_DRBG"; } @@ -535,7 +535,7 @@ BOTAN_REGISTER_TEST("hmac_drbg_unit", HMAC_DRBG_Unit_Tests); #if defined(BOTAN_HAS_CHACHA_RNG) -class ChaCha_RNG_Unit_Tests : public Stateful_RNG_Tests +class ChaCha_RNG_Unit_Tests final : public Stateful_RNG_Tests { public: @@ -607,7 +607,7 @@ BOTAN_REGISTER_TEST("chacha_rng_unit", ChaCha_RNG_Unit_Tests); #if defined(BOTAN_HAS_AUTO_RNG) -class AutoSeeded_RNG_Tests : public Test +class AutoSeeded_RNG_Tests final : public Test { private: Test::Result auto_rng_tests() @@ -694,7 +694,7 @@ BOTAN_REGISTER_TEST("auto_rng_unit", AutoSeeded_RNG_Tests); #if defined(BOTAN_HAS_SYSTEM_RNG) -class System_RNG_Tests : public Test +class System_RNG_Tests final : public Test { public: std::vector<Test::Result> run() override @@ -731,7 +731,7 @@ BOTAN_REGISTER_TEST("system_rng", System_RNG_Tests); #if defined(BOTAN_HAS_RDRAND_RNG) -class RDRAND_RNG_Tests : public Test +class RDRAND_RNG_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_rng.h b/src/tests/test_rng.h index e3ae4af9b..77ae2ba1a 100644 --- a/src/tests/test_rng.h +++ b/src/tests/test_rng.h @@ -93,7 +93,7 @@ class Fixed_Output_RNG : public Botan::RandomNumberGenerator * RNG that outputs a given set of fixed bytes for a specific request count, outputs random otherwise. * Useful for test vectors with fixed nonces, where the algorithm consumes more random than just the fixed nonce. */ -class Fixed_Output_Position_RNG : public Fixed_Output_RNG +class Fixed_Output_Position_RNG final : public Fixed_Output_RNG { public: bool is_seeded() const override @@ -155,7 +155,7 @@ class Fixed_Output_Position_RNG : public Fixed_Output_RNG uint32_t m_requests = 0; }; -class SeedCapturing_RNG : public Botan::RandomNumberGenerator +class SeedCapturing_RNG final : public Botan::RandomNumberGenerator { public: void randomize(uint8_t[], size_t) override @@ -198,7 +198,7 @@ class SeedCapturing_RNG : public Botan::RandomNumberGenerator * RNG that counts the number of requests made to it, for example * to verify that a reseed attempt was made at the expected time. */ -class Request_Counting_RNG : public Botan::RandomNumberGenerator +class Request_Counting_RNG final : public Botan::RandomNumberGenerator { public: Request_Counting_RNG() : m_randomize_count(0) {} diff --git a/src/tests/test_rng_kat.cpp b/src/tests/test_rng_kat.cpp index 85d89a609..e1d4ded36 100644 --- a/src/tests/test_rng_kat.cpp +++ b/src/tests/test_rng_kat.cpp @@ -21,7 +21,7 @@ namespace { #if defined(BOTAN_HAS_HMAC_DRBG) -class HMAC_DRBG_Tests : public Text_Based_Test +class HMAC_DRBG_Tests final : public Text_Based_Test { public: HMAC_DRBG_Tests() @@ -71,7 +71,7 @@ BOTAN_REGISTER_TEST("hmac_drbg", HMAC_DRBG_Tests); #if defined(BOTAN_HAS_CHACHA_RNG) -class ChaCha_RNG_Tests : public Text_Based_Test +class ChaCha_RNG_Tests final : public Text_Based_Test { public: ChaCha_RNG_Tests() diff --git a/src/tests/test_rsa.cpp b/src/tests/test_rsa.cpp index 66a332a55..8ce81b728 100644 --- a/src/tests/test_rsa.cpp +++ b/src/tests/test_rsa.cpp @@ -18,7 +18,7 @@ namespace { #if defined(BOTAN_HAS_RSA) -class RSA_ES_KAT_Tests : public PK_Encryption_Decryption_Test +class RSA_ES_KAT_Tests final : public PK_Encryption_Decryption_Test { public: RSA_ES_KAT_Tests() @@ -39,7 +39,7 @@ class RSA_ES_KAT_Tests : public PK_Encryption_Decryption_Test } }; -class RSA_KEM_Tests : public PK_KEM_Test +class RSA_KEM_Tests final : public PK_KEM_Test { public: RSA_KEM_Tests() @@ -60,7 +60,7 @@ class RSA_KEM_Tests : public PK_KEM_Test }; -class RSA_Signature_KAT_Tests : public PK_Signature_Generation_Test +class RSA_Signature_KAT_Tests final : public PK_Signature_Generation_Test { public: RSA_Signature_KAT_Tests() @@ -86,7 +86,7 @@ class RSA_Signature_KAT_Tests : public PK_Signature_Generation_Test } }; -class RSA_PSS_KAT_Tests : public PK_Signature_Generation_Test +class RSA_PSS_KAT_Tests final : public PK_Signature_Generation_Test { public: RSA_PSS_KAT_Tests() @@ -119,7 +119,7 @@ class RSA_PSS_KAT_Tests : public PK_Signature_Generation_Test } }; -class RSA_PSS_Raw_KAT_Tests : public PK_Signature_Generation_Test +class RSA_PSS_Raw_KAT_Tests final : public PK_Signature_Generation_Test { public: RSA_PSS_Raw_KAT_Tests() @@ -152,7 +152,7 @@ class RSA_PSS_Raw_KAT_Tests : public PK_Signature_Generation_Test } }; -class RSA_Signature_Verify_Tests : public PK_Signature_Verification_Test +class RSA_Signature_Verify_Tests final : public PK_Signature_Verification_Test { public: RSA_Signature_Verify_Tests() @@ -177,7 +177,7 @@ class RSA_Signature_Verify_Tests : public PK_Signature_Verification_Test } }; -class RSA_Signature_Verify_Invalid_Tests : public PK_Signature_NonVerification_Test +class RSA_Signature_Verify_Invalid_Tests final : public PK_Signature_NonVerification_Test { public: RSA_Signature_Verify_Invalid_Tests() @@ -200,7 +200,7 @@ class RSA_Signature_Verify_Invalid_Tests : public PK_Signature_NonVerification_T } }; -class RSA_Keygen_Tests : public PK_Key_Generation_Test +class RSA_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override @@ -213,7 +213,7 @@ class RSA_Keygen_Tests : public PK_Key_Generation_Test } }; -class RSA_Blinding_Tests : public Test +class RSA_Blinding_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_simd.cpp b/src/tests/test_simd.cpp index a502432f5..6da743514 100644 --- a/src/tests/test_simd.cpp +++ b/src/tests/test_simd.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_SIMD_32) -class SIMD_32_Tests : public Test +class SIMD_32_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_sm2.cpp b/src/tests/test_sm2.cpp index 0816a5f76..d81d2c8a8 100644 --- a/src/tests/test_sm2.cpp +++ b/src/tests/test_sm2.cpp @@ -19,7 +19,7 @@ namespace Botan_Tests { namespace { -class SM2_Signature_KAT_Tests : public PK_Signature_Generation_Test +class SM2_Signature_KAT_Tests final : public PK_Signature_Generation_Test { public: SM2_Signature_KAT_Tests() @@ -63,7 +63,7 @@ class SM2_Signature_KAT_Tests : public PK_Signature_Generation_Test BOTAN_REGISTER_TEST("sm2_sig", SM2_Signature_KAT_Tests); -class SM2_Encryption_KAT_Tests : public PK_Encryption_Decryption_Test +class SM2_Encryption_KAT_Tests final : public PK_Encryption_Decryption_Test { public: SM2_Encryption_KAT_Tests() diff --git a/src/tests/test_srp6.cpp b/src/tests/test_srp6.cpp index fe3353571..741e9ef46 100644 --- a/src/tests/test_srp6.cpp +++ b/src/tests/test_srp6.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_SRP6) -class SRP6_Unit_Tests : public Test +class SRP6_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp index 11c723166..50012fe97 100644 --- a/src/tests/test_stream.cpp +++ b/src/tests/test_stream.cpp @@ -14,7 +14,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_STREAM_CIPHER) -class Stream_Cipher_Tests : public Text_Based_Test +class Stream_Cipher_Tests final : public Text_Based_Test { public: Stream_Cipher_Tests(): Text_Based_Test("stream", "Key,Out", "In,Nonce,Seek") {} diff --git a/src/tests/test_tls_messages.cpp b/src/tests/test_tls_messages.cpp index 383959b19..68318eb8d 100644 --- a/src/tests/test_tls_messages.cpp +++ b/src/tests/test_tls_messages.cpp @@ -43,7 +43,7 @@ Test::Result test_hello_verify_request() return result; } -class TLS_Message_Parsing_Test : public Text_Based_Test +class TLS_Message_Parsing_Test final : public Text_Based_Test { public: TLS_Message_Parsing_Test() diff --git a/src/tests/test_tpm.cpp b/src/tests/test_tpm.cpp index 267af4e89..c29c642a1 100644 --- a/src/tests/test_tpm.cpp +++ b/src/tests/test_tpm.cpp @@ -15,7 +15,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_TPM) -class TPM_Tests : public Test +class TPM_Tests final : public Test { public: @@ -81,7 +81,7 @@ class TPM_Tests : public Test BOTAN_REGISTER_TEST("tpm", TPM_Tests); -class UUID_Tests : public Test +class UUID_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_tss.cpp b/src/tests/test_tss.cpp index d9e860726..5a6eec6ba 100644 --- a/src/tests/test_tss.cpp +++ b/src/tests/test_tss.cpp @@ -19,7 +19,7 @@ namespace { #if defined(BOTAN_HAS_THRESHOLD_SECRET_SHARING) -class TSS_Tests : public Test +class TSS_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/test_utils.cpp b/src/tests/test_utils.cpp index d4035de65..b44faac39 100644 --- a/src/tests/test_utils.cpp +++ b/src/tests/test_utils.cpp @@ -25,7 +25,7 @@ namespace Botan_Tests { namespace { -class Utility_Function_Tests : public Text_Based_Test +class Utility_Function_Tests final : public Text_Based_Test { public: Utility_Function_Tests() : Text_Based_Test("util.vec", "In1,In2,Out") {} @@ -213,7 +213,7 @@ class Utility_Function_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("util", Utility_Function_Tests); -class Poly_Double_Tests : public Text_Based_Test +class Poly_Double_Tests final : public Text_Based_Test { public: Poly_Double_Tests() : Text_Based_Test("poly_dbl.vec", "In,Out") {} @@ -234,7 +234,7 @@ class Poly_Double_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("poly_dbl", Poly_Double_Tests); -class Date_Format_Tests : public Text_Based_Test +class Date_Format_Tests final : public Text_Based_Test { public: Date_Format_Tests() : Text_Based_Test("dates.vec", "Date") {} @@ -312,7 +312,7 @@ BOTAN_REGISTER_TEST("util_dates", Date_Format_Tests); #if defined(BOTAN_HAS_BASE64_CODEC) -class Base64_Tests : public Text_Based_Test +class Base64_Tests final : public Text_Based_Test { public: Base64_Tests() : Text_Based_Test("base64.vec", "Base64", "Binary") {} @@ -390,7 +390,7 @@ BOTAN_REGISTER_TEST("base64", Base64_Tests); #endif -class Charset_Tests : public Text_Based_Test +class Charset_Tests final : public Text_Based_Test { public: Charset_Tests() : Text_Based_Test("charset.vec", "In,Out") {} @@ -511,7 +511,7 @@ class Charset_Tests : public Text_Based_Test BOTAN_REGISTER_TEST("charset", Charset_Tests); -class Hostname_Tests : public Text_Based_Test +class Hostname_Tests final : public Text_Based_Test { public: Hostname_Tests() : Text_Based_Test("hostnames.vec", "Issued,Hostname") diff --git a/src/tests/test_workfactor.cpp b/src/tests/test_workfactor.cpp index fecda7d04..c16041cf0 100644 --- a/src/tests/test_workfactor.cpp +++ b/src/tests/test_workfactor.cpp @@ -13,7 +13,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_PUBLIC_KEY_CRYPTO) -class PK_Workfactor_Tests : public Text_Based_Test +class PK_Workfactor_Tests final : public Text_Based_Test { public: PK_Workfactor_Tests() : diff --git a/src/tests/test_x509_dn.cpp b/src/tests/test_x509_dn.cpp index f7a672a73..55cf05c1c 100644 --- a/src/tests/test_x509_dn.cpp +++ b/src/tests/test_x509_dn.cpp @@ -14,7 +14,7 @@ namespace Botan_Tests { #if defined(BOTAN_HAS_ASN1) -class X509_DN_Comparisons_Tests : public Text_Based_Test +class X509_DN_Comparisons_Tests final : public Text_Based_Test { public: X509_DN_Comparisons_Tests() : Text_Based_Test("x509_dn.vec", "DN1,DN2") {} diff --git a/src/tests/test_x509_path.cpp b/src/tests/test_x509_path.cpp index 84b3b682b..e805a29b3 100644 --- a/src/tests/test_x509_path.cpp +++ b/src/tests/test_x509_path.cpp @@ -60,7 +60,7 @@ std::map<std::string, std::string> read_results(const std::string& results_file) return m; } -class X509test_Path_Validation_Tests : public Test +class X509test_Path_Validation_Tests final : public Test { public: std::vector<Test::Result> run() override @@ -137,7 +137,7 @@ class X509test_Path_Validation_Tests : public Test BOTAN_REGISTER_TEST("x509_path_x509test", X509test_Path_Validation_Tests); -class NIST_Path_Validation_Tests : public Test +class NIST_Path_Validation_Tests final : public Test { public: std::vector<Test::Result> run() override; @@ -239,7 +239,7 @@ std::vector<Test::Result> NIST_Path_Validation_Tests::run() BOTAN_REGISTER_TEST("x509_path_nist", NIST_Path_Validation_Tests); -class Extended_Path_Validation_Tests : public Test +class Extended_Path_Validation_Tests final : public Test { public: std::vector<Test::Result> run() override; diff --git a/src/tests/test_xmss.cpp b/src/tests/test_xmss.cpp index 5e3b7bab6..0c69bf986 100644 --- a/src/tests/test_xmss.cpp +++ b/src/tests/test_xmss.cpp @@ -18,7 +18,7 @@ namespace { #if defined(BOTAN_HAS_XMSS) -class XMSS_Signature_Tests : public PK_Signature_Generation_Test +class XMSS_Signature_Tests final : public PK_Signature_Generation_Test { public: XMSS_Signature_Tests() @@ -60,7 +60,7 @@ class XMSS_Signature_Tests : public PK_Signature_Generation_Test } }; -class XMSS_Signature_Verify_Tests : public PK_Signature_Verification_Test +class XMSS_Signature_Verify_Tests final : public PK_Signature_Verification_Test { public: XMSS_Signature_Verify_Tests() @@ -82,7 +82,7 @@ class XMSS_Signature_Verify_Tests : public PK_Signature_Verification_Test } }; -class XMSS_Keygen_Tests : public PK_Key_Generation_Test +class XMSS_Keygen_Tests final : public PK_Key_Generation_Test { public: std::vector<std::string> keygen_params() const override diff --git a/src/tests/tests.h b/src/tests/tests.h index 104ab43da..c4f61dd84 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -38,7 +38,7 @@ namespace Botan_Tests { using Botan::BigInt; #endif -class Test_Error : public Botan::Exception +class Test_Error final : public Botan::Exception { public: explicit Test_Error(const std::string& what) : Exception("Test error", what) {} diff --git a/src/tests/unit_ecc.cpp b/src/tests/unit_ecc.cpp index d79404a79..f46b94295 100644 --- a/src/tests/unit_ecc.cpp +++ b/src/tests/unit_ecc.cpp @@ -135,7 +135,7 @@ Botan::PointGFp create_random_point(Botan::RandomNumberGenerator& rng, } } -class ECC_Randomized_Tests : public Test +class ECC_Randomized_Tests final : public Test { public: std::vector<Test::Result> run() override; @@ -207,7 +207,7 @@ std::vector<Test::Result> ECC_Randomized_Tests::run() BOTAN_REGISTER_TEST("ecc_randomized", ECC_Randomized_Tests); -class NIST_Curve_Reduction_Tests : public Test +class NIST_Curve_Reduction_Tests final : public Test { public: typedef std::function<void (Botan::BigInt&, Botan::secure_vector<Botan::word>&)> reducer_fn; @@ -823,7 +823,7 @@ Test::Result test_curve_cp_ctor() return result; } -class ECC_Unit_Tests : public Test +class ECC_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override @@ -860,7 +860,7 @@ class ECC_Unit_Tests : public Test BOTAN_REGISTER_TEST("ecc_unit", ECC_Unit_Tests); -class ECC_Invalid_Key_Tests : public Text_Based_Test +class ECC_Invalid_Key_Tests final : public Text_Based_Test { public: ECC_Invalid_Key_Tests() : diff --git a/src/tests/unit_ecdh.cpp b/src/tests/unit_ecdh.cpp index 8489d00d4..f7fc475b7 100644 --- a/src/tests/unit_ecdh.cpp +++ b/src/tests/unit_ecdh.cpp @@ -19,7 +19,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_ECDH) -class ECDH_Unit_Tests : public Test +class ECDH_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/unit_ecdsa.cpp b/src/tests/unit_ecdsa.cpp index 46d270aab..584fa5e1d 100644 --- a/src/tests/unit_ecdsa.cpp +++ b/src/tests/unit_ecdsa.cpp @@ -406,7 +406,7 @@ Test::Result test_ecc_key_with_rfc5915_parameters() -class ECDSA_Unit_Tests : public Test +class ECDSA_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp index 2983aa3eb..a7f7514d6 100644 --- a/src/tests/unit_tls.cpp +++ b/src/tests/unit_tls.cpp @@ -43,7 +43,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_TLS) -class Credentials_Manager_Test : public Botan::Credentials_Manager +class Credentials_Manager_Test final : public Botan::Credentials_Manager { public: Credentials_Manager_Test(const Botan::X509_Certificate& rsa_cert, @@ -946,7 +946,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version, return test_dtls_handshake(offer_version, creds, policy, policy, rng, client_ses, server_ses); } -class Test_Policy : public Botan::TLS::Text_Policy +class Test_Policy final : public Botan::TLS::Text_Policy { public: Test_Policy() : Text_Policy("") {} @@ -1097,7 +1097,7 @@ Test::Result test_tls_policy() return result; } -class TLS_Unit_Tests : public Test +class TLS_Unit_Tests final : public Test { private: void test_with_policy(std::vector<Test::Result>& results, diff --git a/src/tests/unit_tls_policy.cpp b/src/tests/unit_tls_policy.cpp index aa337a81b..3261a1130 100644 --- a/src/tests/unit_tls_policy.cpp +++ b/src/tests/unit_tls_policy.cpp @@ -38,7 +38,7 @@ namespace Botan_Tests { namespace { #if defined(BOTAN_HAS_TLS) -class TLS_Policy_Unit_Tests : public Test +class TLS_Policy_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp index 3f28da4a0..bf17fda3f 100644 --- a/src/tests/unit_x509.cpp +++ b/src/tests/unit_x509.cpp @@ -869,7 +869,7 @@ Test::Result test_valid_constraints(const std::string& pk_algo) /** * @brief X.509v3 extension that encodes a given string */ -class String_Extension : public Botan::Certificate_Extension +class String_Extension final : public Botan::Certificate_Extension { public: String_Extension() = default; @@ -1056,7 +1056,7 @@ Test::Result test_hashes(const std::string& algo, const std::string& hash_fn = " return result; } -class X509_Cert_Unit_Tests : public Test +class X509_Cert_Unit_Tests final : public Test { public: std::vector<Test::Result> run() override |