aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/asn1')
-rw-r--r--src/lib/asn1/asn1_obj.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/ber_dec.h6
-rw-r--r--src/lib/asn1/oid_lookup/oids.cpp4
-rw-r--r--src/lib/asn1/x509_dn.h4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/asn1/asn1_obj.h b/src/lib/asn1/asn1_obj.h
index 2bd2b1ed5..3e119dc01 100644
--- a/src/lib/asn1/asn1_obj.h
+++ b/src/lib/asn1/asn1_obj.h
@@ -114,7 +114,7 @@ bool maybe_BER(DataSource& src);
*/
struct BOTAN_DLL BER_Decoding_Error : public Decoding_Error
{
- BER_Decoding_Error(const std::string&);
+ explicit BER_Decoding_Error(const std::string&);
};
/**
diff --git a/src/lib/asn1/asn1_str.h b/src/lib/asn1/asn1_str.h
index 269b821b8..1d75ec519 100644
--- a/src/lib/asn1/asn1_str.h
+++ b/src/lib/asn1/asn1_str.h
@@ -26,7 +26,7 @@ class BOTAN_DLL ASN1_String final : public ASN1_Object
ASN1_Tag tagging() const;
- ASN1_String(const std::string& = "");
+ explicit ASN1_String(const std::string& = "");
ASN1_String(const std::string&, ASN1_Tag);
private:
std::string m_iso_8859_str;
diff --git a/src/lib/asn1/asn1_time.h b/src/lib/asn1/asn1_time.h
index 269cc7983..ba5b84838 100644
--- a/src/lib/asn1/asn1_time.h
+++ b/src/lib/asn1/asn1_time.h
@@ -41,7 +41,7 @@ class BOTAN_DLL X509_Time final : public ASN1_Object
X509_Time() {}
/// Create a X509_Time from a time point
- X509_Time(const std::chrono::system_clock::time_point& time);
+ explicit X509_Time(const std::chrono::system_clock::time_point& time);
/// Create an X509_Time from string
X509_Time(const std::string& t_spec, ASN1_Tag tag);
diff --git a/src/lib/asn1/ber_dec.h b/src/lib/asn1/ber_dec.h
index b755251c5..8a5c9ca45 100644
--- a/src/lib/asn1/ber_dec.h
+++ b/src/lib/asn1/ber_dec.h
@@ -157,13 +157,13 @@ class BOTAN_DLL BER_Decoder
BER_Decoder& operator=(const BER_Decoder&) = delete;
- BER_Decoder(DataSource&);
+ explicit BER_Decoder(DataSource&);
BER_Decoder(const byte[], size_t);
- BER_Decoder(const secure_vector<byte>&);
+ explicit BER_Decoder(const secure_vector<byte>&);
- BER_Decoder(const std::vector<byte>& vec);
+ explicit BER_Decoder(const std::vector<byte>& vec);
BER_Decoder(const BER_Decoder&);
~BER_Decoder();
diff --git a/src/lib/asn1/oid_lookup/oids.cpp b/src/lib/asn1/oid_lookup/oids.cpp
index 0d1ab58ff..cdb863494 100644
--- a/src/lib/asn1/oid_lookup/oids.cpp
+++ b/src/lib/asn1/oid_lookup/oids.cpp
@@ -125,8 +125,8 @@ void OID_Map::read_cfg(std::istream& cfg, const std::string& source)
const std::string oid = clean_ws(s.substr(0, eq));
const std::string name = clean_ws(s.substr(eq + 1, std::string::npos));
- m_str2oid.insert(std::make_pair(name, oid));
- m_oid2str.insert(std::make_pair(oid, name));
+ m_str2oid.insert(std::make_pair(name, OID(oid)));
+ m_oid2str.insert(std::make_pair(OID(oid), name));
}
}
diff --git a/src/lib/asn1/x509_dn.h b/src/lib/asn1/x509_dn.h
index a86cc6417..12553a1a0 100644
--- a/src/lib/asn1/x509_dn.h
+++ b/src/lib/asn1/x509_dn.h
@@ -38,8 +38,8 @@ class BOTAN_DLL X509_DN final : public ASN1_Object
std::vector<byte> get_bits() const;
X509_DN();
- X509_DN(const std::multimap<OID, std::string>&);
- X509_DN(const std::multimap<std::string, std::string>&);
+ explicit X509_DN(const std::multimap<OID, std::string>&);
+ explicit X509_DN(const std::multimap<std::string, std::string>&);
private:
std::multimap<OID, ASN1_String> m_dn_info;
std::vector<byte> m_dn_bits;