aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1
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/asn1
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/asn1')
-rw-r--r--src/lib/asn1/alg_id.h2
-rw-r--r--src/lib/asn1/asn1_alt_name.h2
-rw-r--r--src/lib/asn1/asn1_attribute.h2
-rw-r--r--src/lib/asn1/asn1_oid.h2
-rw-r--r--src/lib/asn1/asn1_str.h2
-rw-r--r--src/lib/asn1/asn1_time.h2
-rw-r--r--src/lib/asn1/x509_dn.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/asn1/alg_id.h b/src/lib/asn1/alg_id.h
index 1516e41ef..3b6c3f7ec 100644
--- a/src/lib/asn1/alg_id.h
+++ b/src/lib/asn1/alg_id.h
@@ -17,7 +17,7 @@ namespace Botan {
/**
* Algorithm Identifier
*/
-class BOTAN_DLL AlgorithmIdentifier : public ASN1_Object
+class BOTAN_DLL AlgorithmIdentifier final : public ASN1_Object
{
public:
enum Encoding_Option { USE_NULL_PARAM };
diff --git a/src/lib/asn1/asn1_alt_name.h b/src/lib/asn1/asn1_alt_name.h
index 3b4120fc3..5ea7cfb14 100644
--- a/src/lib/asn1/asn1_alt_name.h
+++ b/src/lib/asn1/asn1_alt_name.h
@@ -19,7 +19,7 @@ namespace Botan {
/**
* Alternative Name
*/
-class BOTAN_DLL AlternativeName : public ASN1_Object
+class BOTAN_DLL AlternativeName final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;
diff --git a/src/lib/asn1/asn1_attribute.h b/src/lib/asn1/asn1_attribute.h
index 3abdaaeb9..737d84b81 100644
--- a/src/lib/asn1/asn1_attribute.h
+++ b/src/lib/asn1/asn1_attribute.h
@@ -17,7 +17,7 @@ namespace Botan {
/**
* Attribute
*/
-class BOTAN_DLL Attribute : public ASN1_Object
+class BOTAN_DLL Attribute final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder& to) const override;
diff --git a/src/lib/asn1/asn1_oid.h b/src/lib/asn1/asn1_oid.h
index 5c3053ee0..6fbd876ec 100644
--- a/src/lib/asn1/asn1_oid.h
+++ b/src/lib/asn1/asn1_oid.h
@@ -17,7 +17,7 @@ namespace Botan {
/**
* This class represents ASN.1 object identifiers.
*/
-class BOTAN_DLL OID : public ASN1_Object
+class BOTAN_DLL OID final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;
diff --git a/src/lib/asn1/asn1_str.h b/src/lib/asn1/asn1_str.h
index 69370036c..269b821b8 100644
--- a/src/lib/asn1/asn1_str.h
+++ b/src/lib/asn1/asn1_str.h
@@ -15,7 +15,7 @@ namespace Botan {
/**
* Simple String
*/
-class BOTAN_DLL ASN1_String : public ASN1_Object
+class BOTAN_DLL ASN1_String final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;
diff --git a/src/lib/asn1/asn1_time.h b/src/lib/asn1/asn1_time.h
index 313b26b06..269cc7983 100644
--- a/src/lib/asn1/asn1_time.h
+++ b/src/lib/asn1/asn1_time.h
@@ -16,7 +16,7 @@ namespace Botan {
/**
* X.509 Time
*/
-class BOTAN_DLL X509_Time : public ASN1_Object
+class BOTAN_DLL X509_Time final : public ASN1_Object
{
public:
/// DER encode a X509_Time
diff --git a/src/lib/asn1/x509_dn.h b/src/lib/asn1/x509_dn.h
index 9daa68f1c..a86cc6417 100644
--- a/src/lib/asn1/x509_dn.h
+++ b/src/lib/asn1/x509_dn.h
@@ -19,7 +19,7 @@ namespace Botan {
/**
* Distinguished Name
*/
-class BOTAN_DLL X509_DN : public ASN1_Object
+class BOTAN_DLL X509_DN final : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const override;