aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-10 00:51:48 -0500
committerJack Lloyd <[email protected]>2016-01-10 00:51:48 -0500
commit45124582e3b964800f0be1f88773dd6f2cafc672 (patch)
tree9bd788556ddf9731e466b7f24a16e604f662ea24 /src/lib/cert
parent672d29570e55686b90126b5d6f5d337ddf0b8f04 (diff)
Add final attribute to many classes
In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
Diffstat (limited to 'src/lib/cert')
-rw-r--r--src/lib/cert/x509/crl_ent.h2
-rw-r--r--src/lib/cert/x509/ocsp_types.h4
-rw-r--r--src/lib/cert/x509/pkcs10.h2
-rw-r--r--src/lib/cert/x509/x509_crl.h2
-rw-r--r--src/lib/cert/x509/x509_ext.h22
-rw-r--r--src/lib/cert/x509/x509cert.h2
6 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/cert/x509/crl_ent.h b/src/lib/cert/x509/crl_ent.h
index 1b8f4b7cd..ceefdb191 100644
--- a/src/lib/cert/x509/crl_ent.h
+++ b/src/lib/cert/x509/crl_ent.h
@@ -36,7 +36,7 @@ enum CRL_Code {
/**
* This class represents CRL entries
*/
-class BOTAN_DLL CRL_Entry : public ASN1_Object
+class BOTAN_DLL CRL_Entry final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;
diff --git a/src/lib/cert/x509/ocsp_types.h b/src/lib/cert/x509/ocsp_types.h
index 42a84c38b..6df8ac17f 100644
--- a/src/lib/cert/x509/ocsp_types.h
+++ b/src/lib/cert/x509/ocsp_types.h
@@ -16,7 +16,7 @@ namespace Botan {
namespace OCSP {
-class BOTAN_DLL CertID : public ASN1_Object
+class BOTAN_DLL CertID final : public ASN1_Object
{
public:
CertID() {}
@@ -39,7 +39,7 @@ class BOTAN_DLL CertID : public ASN1_Object
BigInt m_subject_serial;
};
-class BOTAN_DLL SingleResponse : public ASN1_Object
+class BOTAN_DLL SingleResponse final : public ASN1_Object
{
public:
const CertID& certid() const { return m_certid; }
diff --git a/src/lib/cert/x509/pkcs10.h b/src/lib/cert/x509/pkcs10.h
index 999395f93..94db222cd 100644
--- a/src/lib/cert/x509/pkcs10.h
+++ b/src/lib/cert/x509/pkcs10.h
@@ -21,7 +21,7 @@ namespace Botan {
/**
* PKCS #10 Certificate Request.
*/
-class BOTAN_DLL PKCS10_Request : public X509_Object
+class BOTAN_DLL PKCS10_Request final : public X509_Object
{
public:
/**
diff --git a/src/lib/cert/x509/x509_crl.h b/src/lib/cert/x509/x509_crl.h
index b3c0c1349..25556000d 100644
--- a/src/lib/cert/x509/x509_crl.h
+++ b/src/lib/cert/x509/x509_crl.h
@@ -19,7 +19,7 @@ class X509_Certificate;
/**
* This class represents X.509 Certificate Revocation Lists (CRLs).
*/
-class BOTAN_DLL X509_CRL : public X509_Object
+class BOTAN_DLL X509_CRL final : public X509_Object
{
public:
/**
diff --git a/src/lib/cert/x509/x509_ext.h b/src/lib/cert/x509/x509_ext.h
index 5816dc699..8e30237a7 100644
--- a/src/lib/cert/x509/x509_ext.h
+++ b/src/lib/cert/x509/x509_ext.h
@@ -86,7 +86,7 @@ static const size_t NO_CERT_PATH_LIMIT = 0xFFFFFFF0;
/**
* Basic Constraints Extension
*/
-class BOTAN_DLL Basic_Constraints : public Certificate_Extension
+class BOTAN_DLL Basic_Constraints final : public Certificate_Extension
{
public:
Basic_Constraints* copy() const override
@@ -112,7 +112,7 @@ class BOTAN_DLL Basic_Constraints : public Certificate_Extension
/**
* Key Usage Constraints Extension
*/
-class BOTAN_DLL Key_Usage : public Certificate_Extension
+class BOTAN_DLL Key_Usage final : public Certificate_Extension
{
public:
Key_Usage* copy() const override { return new Key_Usage(constraints); }
@@ -135,7 +135,7 @@ class BOTAN_DLL Key_Usage : public Certificate_Extension
/**
* Subject Key Identifier Extension
*/
-class BOTAN_DLL Subject_Key_ID : public Certificate_Extension
+class BOTAN_DLL Subject_Key_ID final : public Certificate_Extension
{
public:
Subject_Key_ID* copy() const override
@@ -160,7 +160,7 @@ class BOTAN_DLL Subject_Key_ID : public Certificate_Extension
/**
* Authority Key Identifier Extension
*/
-class BOTAN_DLL Authority_Key_ID : public Certificate_Extension
+class BOTAN_DLL Authority_Key_ID final : public Certificate_Extension
{
public:
Authority_Key_ID* copy() const override
@@ -233,7 +233,7 @@ class BOTAN_DLL Issuer_Alternative_Name : public Alternative_Name
/**
* Extended Key Usage Extension
*/
-class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension
+class BOTAN_DLL Extended_Key_Usage final : public Certificate_Extension
{
public:
Extended_Key_Usage* copy() const override
@@ -258,7 +258,7 @@ class BOTAN_DLL Extended_Key_Usage : public Certificate_Extension
/**
* Certificate Policies Extension
*/
-class BOTAN_DLL Certificate_Policies : public Certificate_Extension
+class BOTAN_DLL Certificate_Policies final : public Certificate_Extension
{
public:
Certificate_Policies* copy() const override
@@ -280,7 +280,7 @@ class BOTAN_DLL Certificate_Policies : public Certificate_Extension
std::vector<OID> oids;
};
-class BOTAN_DLL Authority_Information_Access : public Certificate_Extension
+class BOTAN_DLL Authority_Information_Access final : public Certificate_Extension
{
public:
Authority_Information_Access* copy() const override
@@ -308,7 +308,7 @@ class BOTAN_DLL Authority_Information_Access : public Certificate_Extension
/**
* CRL Number Extension
*/
-class BOTAN_DLL CRL_Number : public Certificate_Extension
+class BOTAN_DLL CRL_Number final : public Certificate_Extension
{
public:
CRL_Number* copy() const override;
@@ -332,7 +332,7 @@ class BOTAN_DLL CRL_Number : public Certificate_Extension
/**
* CRL Entry Reason Code Extension
*/
-class BOTAN_DLL CRL_ReasonCode : public Certificate_Extension
+class BOTAN_DLL CRL_ReasonCode final : public Certificate_Extension
{
public:
CRL_ReasonCode* copy() const override
@@ -355,10 +355,10 @@ class BOTAN_DLL CRL_ReasonCode : public Certificate_Extension
/**
* CRL Distribution Points Extension
*/
-class BOTAN_DLL CRL_Distribution_Points : public Certificate_Extension
+class BOTAN_DLL CRL_Distribution_Points final : public Certificate_Extension
{
public:
- class BOTAN_DLL Distribution_Point : public ASN1_Object
+ class BOTAN_DLL Distribution_Point final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;
diff --git a/src/lib/cert/x509/x509cert.h b/src/lib/cert/x509/x509cert.h
index 144ceb909..d5784f427 100644
--- a/src/lib/cert/x509/x509cert.h
+++ b/src/lib/cert/x509/x509cert.h
@@ -30,7 +30,7 @@ enum class Usage_Type
/**
* This class represents X.509 Certificate
*/
-class BOTAN_DLL X509_Certificate : public X509_Object
+class BOTAN_DLL X509_Certificate final : public X509_Object
{
public:
/**