11#include <botan/asn1_obj.h>
24BOTAN_DEPRECATED(
"Use OID::register_oid")
25inline
void add_oid(const
OID& oid,
std::string_view
name)
27 OID::register_oid(oid,
name);
30BOTAN_DEPRECATED(
"Use OID::register_oid")
32void add_oid2str(const
OID& oid,
std::string_view
name);
34BOTAN_DEPRECATED("Use
OID::register_oid")
36void add_str2oid(const
OID& oid,
std::string_view
name);
38BOTAN_DEPRECATED("Use
OID::register_oid")
39inline
void add_oidstr(const
char* oidstr, const
char*
name)
41 OID::register_oid(
OID(oidstr),
name);
49BOTAN_DEPRECATED(
"Use OID::human_name_or_empty")
50inline
std::
string oid2str_or_empty(const
OID& oid)
52 return oid.human_name_or_empty();
61BOTAN_DEPRECATED(
"Use OID::from_name")
64 return OID::from_name(
name).value_or(
OID());
67BOTAN_DEPRECATED(
"Use OID::human_name_or_empty")
68inline
std::
string oid2str_or_throw(const
OID& oid)
70 std::string s = oid.human_name_or_empty();
72 throw Lookup_Error(
"No name associated with OID " + oid.to_string());
76BOTAN_DEPRECATED(
"Use OID::human_name_or_empty")
77inline
std::
string lookup(const
OID& oid)
79 return oid.human_name_or_empty();
82BOTAN_DEPRECATED(
"Use OID::from_name")
85 return OID::from_name(
name).value_or(
OID());
#define BOTAN_DEPRECATED_HEADER(hdr)
#define BOTAN_UNSTABLE_API