aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/certstor.h4
-rw-r--r--src/lib/x509/name_constraint.h2
-rw-r--r--src/lib/x509/ocsp.h2
-rw-r--r--src/lib/x509/ocsp_types.h2
-rw-r--r--src/lib/x509/x509_ext.cpp2
-rw-r--r--src/lib/x509/x509_ext.h24
-rw-r--r--src/lib/x509/x509_obj.h6
-rw-r--r--src/lib/x509/x509cert.h8
-rw-r--r--src/lib/x509/x509path.cpp2
9 files changed, 26 insertions, 26 deletions
diff --git a/src/lib/x509/certstor.h b/src/lib/x509/certstor.h
index 3ac357767..6f0dc9cb3 100644
--- a/src/lib/x509/certstor.h
+++ b/src/lib/x509/certstor.h
@@ -19,7 +19,7 @@ namespace Botan {
class BOTAN_DLL Certificate_Store
{
public:
- virtual ~Certificate_Store() {}
+ virtual ~Certificate_Store() = default;
/**
* Find a certificate by Subject DN and (optionally) key identifier
@@ -79,7 +79,7 @@ class BOTAN_DLL Certificate_Store_In_Memory : public Certificate_Store
/**
* Create an empty store.
*/
- Certificate_Store_In_Memory() {}
+ Certificate_Store_In_Memory() = default;
/**
* Add a certificate to the store.
diff --git a/src/lib/x509/name_constraint.h b/src/lib/x509/name_constraint.h
index 43d7fcbcb..68551dc32 100644
--- a/src/lib/x509/name_constraint.h
+++ b/src/lib/x509/name_constraint.h
@@ -37,7 +37,7 @@ class BOTAN_DLL GeneralName : public ASN1_Object
/**
* Creates an empty GeneralName.
*/
- GeneralName() : m_type(), m_name() {}
+ GeneralName() = default;
/**
* Creates a new GeneralName for its string format.
diff --git a/src/lib/x509/ocsp.h b/src/lib/x509/ocsp.h
index 881eee124..42c45e406 100644
--- a/src/lib/x509/ocsp.h
+++ b/src/lib/x509/ocsp.h
@@ -72,7 +72,7 @@ class BOTAN_DLL Response
/**
* Creates an empty OCSP response.
*/
- Response() {}
+ Response() = default;
/**
* Parses an OCSP response.
diff --git a/src/lib/x509/ocsp_types.h b/src/lib/x509/ocsp_types.h
index be7ae716a..c69d306ed 100644
--- a/src/lib/x509/ocsp_types.h
+++ b/src/lib/x509/ocsp_types.h
@@ -19,7 +19,7 @@ namespace OCSP {
class BOTAN_DLL CertID final : public ASN1_Object
{
public:
- CertID() {}
+ CertID() = default;
CertID(const X509_Certificate& issuer,
const BigInt& subject_serial);
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index 965c8efcf..203a81cb9 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -658,7 +658,7 @@ namespace {
class Policy_Information : public ASN1_Object
{
public:
- Policy_Information() {}
+ Policy_Information() = default;
explicit Policy_Information(const OID& oid) : m_oid(oid) {}
const OID& oid() const { return m_oid; }
diff --git a/src/lib/x509/x509_ext.h b/src/lib/x509/x509_ext.h
index f00535eb2..c6cfbaee0 100644
--- a/src/lib/x509/x509_ext.h
+++ b/src/lib/x509/x509_ext.h
@@ -72,7 +72,7 @@ class BOTAN_DLL Certificate_Extension
std::vector<std::set<Certificate_Status_Code>>& cert_status,
size_t pos);
- virtual ~Certificate_Extension() {}
+ virtual ~Certificate_Extension() = default;
protected:
friend class Extensions;
virtual bool should_encode() const { return true; }
@@ -236,7 +236,7 @@ class BOTAN_DLL Subject_Key_ID final : public Certificate_Extension
Subject_Key_ID* copy() const override
{ return new Subject_Key_ID(m_key_id); }
- Subject_Key_ID() {}
+ Subject_Key_ID() = default;
explicit Subject_Key_ID(const std::vector<uint8_t>&);
std::vector<uint8_t> get_key_id() const { return m_key_id; }
@@ -261,7 +261,7 @@ class BOTAN_DLL Authority_Key_ID final : public Certificate_Extension
Authority_Key_ID* copy() const override
{ return new Authority_Key_ID(m_key_id); }
- Authority_Key_ID() {}
+ Authority_Key_ID() = default;
explicit Authority_Key_ID(const std::vector<uint8_t>& k) : m_key_id(k) {}
std::vector<uint8_t> get_key_id() const { return m_key_id; }
@@ -336,7 +336,7 @@ class BOTAN_DLL Extended_Key_Usage final : public Certificate_Extension
Extended_Key_Usage* copy() const override
{ return new Extended_Key_Usage(m_oids); }
- Extended_Key_Usage() {}
+ Extended_Key_Usage() = default;
explicit Extended_Key_Usage(const std::vector<OID>& o) : m_oids(o) {}
std::vector<OID> get_oids() const { return m_oids; }
@@ -362,7 +362,7 @@ class BOTAN_DLL Name_Constraints : public Certificate_Extension
Name_Constraints* copy() const override
{ return new Name_Constraints(m_name_constraints); }
- Name_Constraints() {}
+ Name_Constraints() = default;
Name_Constraints(const NameConstraints &nc) : m_name_constraints(nc) {}
void validate(const X509_Certificate& subject, const X509_Certificate& issuer,
@@ -391,7 +391,7 @@ class BOTAN_DLL Certificate_Policies final : public Certificate_Extension
Certificate_Policies* copy() const override
{ return new Certificate_Policies(m_oids); }
- Certificate_Policies() {}
+ Certificate_Policies() = default;
explicit Certificate_Policies(const std::vector<OID>& o) : m_oids(o) {}
std::vector<OID> get_oids() const { return m_oids; }
@@ -414,7 +414,7 @@ class BOTAN_DLL Authority_Information_Access final : public Certificate_Extensio
Authority_Information_Access* copy() const override
{ return new Authority_Information_Access(m_ocsp_responder); }
- Authority_Information_Access() {}
+ Authority_Information_Access() = default;
explicit Authority_Information_Access(const std::string& ocsp) :
m_ocsp_responder(ocsp) {}
@@ -502,7 +502,7 @@ class BOTAN_DLL CRL_Distribution_Points final : public Certificate_Extension
CRL_Distribution_Points* copy() const override
{ return new CRL_Distribution_Points(m_distribution_points); }
- CRL_Distribution_Points() {}
+ CRL_Distribution_Points() = default;
explicit CRL_Distribution_Points(const std::vector<Distribution_Point>& points) :
m_distribution_points(points) {}
@@ -537,12 +537,12 @@ class BOTAN_DLL Unknown_Critical_Extension final : public Certificate_Extension
{ return new Unknown_Critical_Extension(m_oid); }
OID oid_of() const override
- { return m_oid; };
+ { return m_oid; }
void validate(const X509_Certificate&, const X509_Certificate&,
- const std::vector<std::shared_ptr<const X509_Certificate>>&,
- std::vector<std::set<Certificate_Status_Code>>& cert_status,
- size_t pos) override
+ const std::vector<std::shared_ptr<const X509_Certificate>>&,
+ std::vector<std::set<Certificate_Status_Code>>& cert_status,
+ size_t pos) override
{
cert_status.at(pos).insert(Certificate_Status_Code::UNKNOWN_CRITICAL_EXTENSION);
}
diff --git a/src/lib/x509/x509_obj.h b/src/lib/x509/x509_obj.h
index c2bf7b9c2..522667397 100644
--- a/src/lib/x509/x509_obj.h
+++ b/src/lib/x509/x509_obj.h
@@ -93,7 +93,9 @@ class BOTAN_DLL X509_Object : public ASN1_Object
*/
std::string PEM_encode() const;
- virtual ~X509_Object() {}
+ X509_Object(const X509_Object&) = default;
+ X509_Object& operator=(const X509_Object&) = default;
+ virtual ~X509_Object() = default;
protected:
X509_Object(DataSource& src, const std::string& pem_labels);
X509_Object(const std::vector<uint8_t>& vec, const std::string& labels);
@@ -103,7 +105,7 @@ class BOTAN_DLL X509_Object : public ASN1_Object
#endif
void do_decode();
- X509_Object() {}
+ X509_Object() = default;
AlgorithmIdentifier m_sig_algo;
std::vector<uint8_t> m_tbs_bits, m_sig;
private:
diff --git a/src/lib/x509/x509cert.h b/src/lib/x509/x509cert.h
index c6887f4e5..ab943db4b 100644
--- a/src/lib/x509/x509cert.h
+++ b/src/lib/x509/x509cert.h
@@ -154,9 +154,9 @@ class BOTAN_DLL X509_Certificate : public X509_Object
bool is_CA_cert() const;
/**
- * Returns true if the specified @param usage is set in the key usage extension
+ * Returns true if the specified @param usage is set in the key usage extension
* or if no key usage constraints are set at all.
- * To check if a certain key constraint is set in the certificate
+ * To check if a certain key constraint is set in the certificate
* use @see X509_Certificate#has_constraints.
*/
bool allowed_usage(Key_Constraints usage) const;
@@ -178,7 +178,7 @@ class BOTAN_DLL X509_Certificate : public X509_Object
/// Returns true if the specified @param constraints are included in the key usage extension.
bool has_constraints(Key_Constraints constraints) const;
-
+
/**
* Returns true if and only if @param ex_constraint (referring to an extended key
* constraint, eg "PKIX.ServerAuth") is included in the extended
@@ -304,7 +304,7 @@ class BOTAN_DLL X509_Certificate : public X509_Object
friend class X509_CA;
friend class BER_Decoder;
- X509_Certificate() {}
+ X509_Certificate() = default;
Data_Store m_subject, m_issuer;
bool m_self_signed;
diff --git a/src/lib/x509/x509path.cpp b/src/lib/x509/x509path.cpp
index eeb75b279..8521e51a7 100644
--- a/src/lib/x509/x509path.cpp
+++ b/src/lib/x509/x509path.cpp
@@ -269,7 +269,6 @@ PKIX::check_ocsp_online(const std::vector<std::shared_ptr<const X509_Certificate
{
ocsp_response_futures.emplace_back(std::async(std::launch::deferred, [&]() -> std::shared_ptr<const OCSP::Response> {
throw Exception("No OCSP responder URL set for this certificate");
- return std::shared_ptr<const OCSP::Response>();
}));
}
else
@@ -358,7 +357,6 @@ PKIX::check_crl_online(const std::vector<std::shared_ptr<const X509_Certificate>
// Avoid creating a thread for this case
future_crls.emplace_back(std::async(std::launch::deferred, [&]() -> std::shared_ptr<const X509_CRL> {
throw Exception("No CRL distribution point for this certificate");
- return std::shared_ptr<const X509_CRL>();
}));
}
else