aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/prov')
-rw-r--r--src/lib/prov/bearssl/bearssl.h2
-rw-r--r--src/lib/prov/bearssl/bearssl_ec.cpp4
-rw-r--r--src/lib/prov/bearssl/bearssl_hash.cpp2
-rw-r--r--src/lib/prov/openssl/openssl.h2
-rw-r--r--src/lib/prov/openssl/openssl_block.cpp2
-rw-r--r--src/lib/prov/openssl/openssl_ec.cpp6
-rw-r--r--src/lib/prov/openssl/openssl_hash.cpp2
-rw-r--r--src/lib/prov/openssl/openssl_mode.cpp2
-rw-r--r--src/lib/prov/openssl/openssl_rc4.cpp2
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp8
-rw-r--r--src/lib/prov/pkcs11/p11.h2
-rw-r--r--src/lib/prov/pkcs11/p11_ecdh.cpp2
-rw-r--r--src/lib/prov/pkcs11/p11_ecdh.h2
-rw-r--r--src/lib/prov/pkcs11/p11_ecdsa.cpp4
-rw-r--r--src/lib/prov/pkcs11/p11_mechanism.cpp4
-rw-r--r--src/lib/prov/pkcs11/p11_object.h6
-rw-r--r--src/lib/prov/pkcs11/p11_rsa.cpp6
-rw-r--r--src/lib/prov/pkcs11/p11_rsa.h2
-rw-r--r--src/lib/prov/tpm/tpm.cpp2
-rw-r--r--src/lib/prov/tpm/tpm.h9
-rw-r--r--src/lib/prov/tpm/uuid.h2
21 files changed, 37 insertions, 36 deletions
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