Botan  2.15.0
Crypto and TLS for C++11
Functions
Botan::OIDS Namespace Reference

Functions

BOTAN_UNSTABLE_API void add_oid (const OID &oid, const std::string &name)
 
BOTAN_UNSTABLE_API void add_oid2str (const OID &oid, const std::string &name)
 
BOTAN_UNSTABLE_API void add_oidstr (const char *oidstr, const char *name)
 
BOTAN_UNSTABLE_API void add_str2oid (const OID &oid, const std::string &name)
 
BOTAN_UNSTABLE_API bool have_oid (const std::string &oid)
 
std::unordered_map< std::string, std::string > load_oid2str_map ()
 
std::unordered_map< std::string, OIDload_str2oid_map ()
 
std::string lookup (const OID &oid)
 
OID lookup (const std::string &name)
 
bool name_of (const OID &oid, const std::string &name)
 
std::string oid2str (const OID &oid)
 
BOTAN_UNSTABLE_API std::string oid2str_or_empty (const OID &oid)
 
BOTAN_UNSTABLE_API std::string oid2str_or_throw (const OID &oid)
 
OID str2oid (const std::string &name)
 
BOTAN_UNSTABLE_API OID str2oid_or_empty (const std::string &name)
 

Function Documentation

◆ add_oid()

void Botan::OIDS::add_oid ( const OID oid,
const std::string &  name 
)

Register an OID to string mapping.

Parameters
oidthe oid to register
namethe name to be associated with the oid

Definition at line 91 of file oids.cpp.

References name.

Referenced by add_oidstr().

92  {
93  OID_Map::global_registry().add_oid(oid, name);
94  }
std::string name

◆ add_oid2str()

void Botan::OIDS::add_oid2str ( const OID oid,
const std::string &  name 
)

Definition at line 101 of file oids.cpp.

References name.

102  {
103  OID_Map::global_registry().add_oid2str(oid, name);
104  }
std::string name

◆ add_oidstr()

void Botan::OIDS::add_oidstr ( const char *  oidstr,
const char *  name 
)

Definition at line 96 of file oids.cpp.

References add_oid(), and name.

97  {
98  add_oid(OID(oidstr), name);
99  }
std::string name
BOTAN_UNSTABLE_API void add_oid(const OID &oid, const std::string &name)
Definition: oids.cpp:91

◆ add_str2oid()

void Botan::OIDS::add_str2oid ( const OID oid,
const std::string &  name 
)

Definition at line 106 of file oids.cpp.

References name.

107  {
108  OID_Map::global_registry().add_str2oid(oid, name);
109  }
std::string name

◆ have_oid()

bool Botan::OIDS::have_oid ( const std::string &  oid)

See if an OID exists in the internal table.

Parameters
oidthe oid to check for
Returns
true if the oid is registered

Definition at line 129 of file oids.cpp.

References name.

130  {
131  return OID_Map::global_registry().have_oid(name);
132  }
std::string name

◆ load_oid2str_map()

std::unordered_map< std::string, std::string > Botan::OIDS::load_oid2str_map ( )

Definition at line 17 of file oid_maps.cpp.

18  {
19  return std::unordered_map<std::string,std::string>{
20  { "0.3.4401.5.3.1.9.26", "Camellia-192/GCM" },
21  { "0.3.4401.5.3.1.9.46", "Camellia-256/GCM" },
22  { "0.3.4401.5.3.1.9.6", "Camellia-128/GCM" },
23  { "0.4.0.127.0.15.1.1.13.0", "XMSS" },
24  { "1.0.14888.3.0.5", "ECKCDSA" },
25  { "1.2.156.10197.1.104.100", "SM4/OCB" },
26  { "1.2.156.10197.1.104.2", "SM4/CBC" },
27  { "1.2.156.10197.1.104.8", "SM4/GCM" },
28  { "1.2.156.10197.1.301", "sm2p256v1" },
29  { "1.2.156.10197.1.301.1", "SM2" },
30  { "1.2.156.10197.1.301.2", "SM2_Kex" },
31  { "1.2.156.10197.1.301.3", "SM2_Enc" },
32  { "1.2.156.10197.1.401", "SM3" },
33  { "1.2.156.10197.1.501", "SM2_Sig/SM3" },
34  { "1.2.156.10197.1.504", "RSA/EMSA3(SM3)" },
35  { "1.2.250.1.223.101.256.1", "frp256v1" },
36  { "1.2.392.200011.61.1.1.1.2", "Camellia-128/CBC" },
37  { "1.2.392.200011.61.1.1.1.3", "Camellia-192/CBC" },
38  { "1.2.392.200011.61.1.1.1.4", "Camellia-256/CBC" },
39  { "1.2.410.200004.1.100.4.3", "ECKCDSA/EMSA1(SHA-1)" },
40  { "1.2.410.200004.1.100.4.4", "ECKCDSA/EMSA1(SHA-224)" },
41  { "1.2.410.200004.1.100.4.5", "ECKCDSA/EMSA1(SHA-256)" },
42  { "1.2.410.200004.1.4", "SEED/CBC" },
43  { "1.2.643.100.1", "GOST.OGRN" },
44  { "1.2.643.100.111", "GOST.SubjectSigningTool" },
45  { "1.2.643.100.112", "GOST.IssuerSigningTool" },
46  { "1.2.643.2.2.19", "GOST-34.10" },
47  { "1.2.643.2.2.3", "GOST-34.10/EMSA1(GOST-R-34.11-94)" },
48  { "1.2.643.2.2.35.1", "gost_256A" },
49  { "1.2.643.2.2.36.0", "gost_256A" },
50  { "1.2.643.3.131.1.1", "GOST.INN" },
51  { "1.2.643.7.1.1.1.1", "GOST-34.10-2012-256" },
52  { "1.2.643.7.1.1.1.2", "GOST-34.10-2012-512" },
53  { "1.2.643.7.1.1.2.2", "Streebog-256" },
54  { "1.2.643.7.1.1.2.3", "Streebog-512" },
55  { "1.2.643.7.1.1.3.2", "GOST-34.10-2012-256/EMSA1(Streebog-256)" },
56  { "1.2.643.7.1.1.3.3", "GOST-34.10-2012-512/EMSA1(Streebog-512)" },
57  { "1.2.643.7.1.2.1.1.1", "gost_256A" },
58  { "1.2.643.7.1.2.1.1.2", "gost_256B" },
59  { "1.2.643.7.1.2.1.2.1", "gost_512A" },
60  { "1.2.643.7.1.2.1.2.2", "gost_512B" },
61  { "1.2.840.10040.4.1", "DSA" },
62  { "1.2.840.10040.4.3", "DSA/EMSA1(SHA-160)" },
63  { "1.2.840.10045.2.1", "ECDSA" },
64  { "1.2.840.10045.3.1.1", "secp192r1" },
65  { "1.2.840.10045.3.1.2", "x962_p192v2" },
66  { "1.2.840.10045.3.1.3", "x962_p192v3" },
67  { "1.2.840.10045.3.1.4", "x962_p239v1" },
68  { "1.2.840.10045.3.1.5", "x962_p239v2" },
69  { "1.2.840.10045.3.1.6", "x962_p239v3" },
70  { "1.2.840.10045.3.1.7", "secp256r1" },
71  { "1.2.840.10045.4.1", "ECDSA/EMSA1(SHA-160)" },
72  { "1.2.840.10045.4.3.1", "ECDSA/EMSA1(SHA-224)" },
73  { "1.2.840.10045.4.3.2", "ECDSA/EMSA1(SHA-256)" },
74  { "1.2.840.10045.4.3.3", "ECDSA/EMSA1(SHA-384)" },
75  { "1.2.840.10045.4.3.4", "ECDSA/EMSA1(SHA-512)" },
76  { "1.2.840.10046.2.1", "DH" },
77  { "1.2.840.113533.7.66.10", "CAST-128/CBC" },
78  { "1.2.840.113533.7.66.15", "KeyWrap.CAST-128" },
79  { "1.2.840.113549.1.1.1", "RSA" },
80  { "1.2.840.113549.1.1.10", "RSA/EMSA4" },
81  { "1.2.840.113549.1.1.11", "RSA/EMSA3(SHA-256)" },
82  { "1.2.840.113549.1.1.12", "RSA/EMSA3(SHA-384)" },
83  { "1.2.840.113549.1.1.13", "RSA/EMSA3(SHA-512)" },
84  { "1.2.840.113549.1.1.14", "RSA/EMSA3(SHA-224)" },
85  { "1.2.840.113549.1.1.16", "RSA/EMSA3(SHA-512-256)" },
86  { "1.2.840.113549.1.1.4", "RSA/EMSA3(MD5)" },
87  { "1.2.840.113549.1.1.5", "RSA/EMSA3(SHA-160)" },
88  { "1.2.840.113549.1.1.7", "RSA/OAEP" },
89  { "1.2.840.113549.1.1.8", "MGF1" },
90  { "1.2.840.113549.1.5.12", "PKCS5.PBKDF2" },
91  { "1.2.840.113549.1.5.13", "PBE-PKCS5v20" },
92  { "1.2.840.113549.1.9.1", "PKCS9.EmailAddress" },
93  { "1.2.840.113549.1.9.14", "PKCS9.ExtensionRequest" },
94  { "1.2.840.113549.1.9.16.3.18", "ChaCha20Poly1305" },
95  { "1.2.840.113549.1.9.16.3.6", "KeyWrap.TripleDES" },
96  { "1.2.840.113549.1.9.16.3.8", "Compression.Zlib" },
97  { "1.2.840.113549.1.9.2", "PKCS9.UnstructuredName" },
98  { "1.2.840.113549.1.9.3", "PKCS9.ContentType" },
99  { "1.2.840.113549.1.9.4", "PKCS9.MessageDigest" },
100  { "1.2.840.113549.1.9.7", "PKCS9.ChallengePassword" },
101  { "1.2.840.113549.2.10", "HMAC(SHA-384)" },
102  { "1.2.840.113549.2.11", "HMAC(SHA-512)" },
103  { "1.2.840.113549.2.13", "HMAC(SHA-512-256)" },
104  { "1.2.840.113549.2.5", "MD5" },
105  { "1.2.840.113549.2.7", "HMAC(SHA-160)" },
106  { "1.2.840.113549.2.8", "HMAC(SHA-224)" },
107  { "1.2.840.113549.2.9", "HMAC(SHA-256)" },
108  { "1.2.840.113549.3.7", "TripleDES/CBC" },
109  { "1.3.101.110", "Curve25519" },
110  { "1.3.101.112", "Ed25519" },
111  { "1.3.132.0.10", "secp256k1" },
112  { "1.3.132.0.30", "secp160r2" },
113  { "1.3.132.0.31", "secp192k1" },
114  { "1.3.132.0.32", "secp224k1" },
115  { "1.3.132.0.33", "secp224r1" },
116  { "1.3.132.0.34", "secp384r1" },
117  { "1.3.132.0.35", "secp521r1" },
118  { "1.3.132.0.8", "secp160r1" },
119  { "1.3.132.0.9", "secp160k1" },
120  { "1.3.132.1.12", "ECDH" },
121  { "1.3.14.3.2.26", "SHA-160" },
122  { "1.3.14.3.2.7", "DES/CBC" },
123  { "1.3.36.3.2.1", "RIPEMD-160" },
124  { "1.3.36.3.3.1.2", "RSA/EMSA3(RIPEMD-160)" },
125  { "1.3.36.3.3.2.5.2.1", "ECGDSA" },
126  { "1.3.36.3.3.2.5.4.1", "ECGDSA/EMSA1(RIPEMD-160)" },
127  { "1.3.36.3.3.2.5.4.2", "ECGDSA/EMSA1(SHA-160)" },
128  { "1.3.36.3.3.2.5.4.3", "ECGDSA/EMSA1(SHA-224)" },
129  { "1.3.36.3.3.2.5.4.4", "ECGDSA/EMSA1(SHA-256)" },
130  { "1.3.36.3.3.2.5.4.5", "ECGDSA/EMSA1(SHA-384)" },
131  { "1.3.36.3.3.2.5.4.6", "ECGDSA/EMSA1(SHA-512)" },
132  { "1.3.36.3.3.2.8.1.1.1", "brainpool160r1" },
133  { "1.3.36.3.3.2.8.1.1.11", "brainpool384r1" },
134  { "1.3.36.3.3.2.8.1.1.13", "brainpool512r1" },
135  { "1.3.36.3.3.2.8.1.1.3", "brainpool192r1" },
136  { "1.3.36.3.3.2.8.1.1.5", "brainpool224r1" },
137  { "1.3.36.3.3.2.8.1.1.7", "brainpool256r1" },
138  { "1.3.36.3.3.2.8.1.1.9", "brainpool320r1" },
139  { "1.3.6.1.4.1.11591.12.2", "Tiger(24,3)" },
140  { "1.3.6.1.4.1.11591.15.1", "OpenPGP.Ed25519" },
141  { "1.3.6.1.4.1.11591.4.11", "Scrypt" },
142  { "1.3.6.1.4.1.25258.1.3", "McEliece" },
143  { "1.3.6.1.4.1.25258.1.5", "XMSS-draft6" },
144  { "1.3.6.1.4.1.25258.1.6.1", "GOST-34.10-2012-256/EMSA1(SHA-256)" },
145  { "1.3.6.1.4.1.25258.1.8", "XMSS-draft12" },
146  { "1.3.6.1.4.1.25258.3.1", "Serpent/CBC" },
147  { "1.3.6.1.4.1.25258.3.101", "Serpent/GCM" },
148  { "1.3.6.1.4.1.25258.3.102", "Twofish/GCM" },
149  { "1.3.6.1.4.1.25258.3.2", "Threefish-512/CBC" },
150  { "1.3.6.1.4.1.25258.3.2.1", "AES-128/OCB" },
151  { "1.3.6.1.4.1.25258.3.2.2", "AES-192/OCB" },
152  { "1.3.6.1.4.1.25258.3.2.3", "AES-256/OCB" },
153  { "1.3.6.1.4.1.25258.3.2.4", "Serpent/OCB" },
154  { "1.3.6.1.4.1.25258.3.2.5", "Twofish/OCB" },
155  { "1.3.6.1.4.1.25258.3.2.6", "Camellia-128/OCB" },
156  { "1.3.6.1.4.1.25258.3.2.7", "Camellia-192/OCB" },
157  { "1.3.6.1.4.1.25258.3.2.8", "Camellia-256/OCB" },
158  { "1.3.6.1.4.1.25258.3.3", "Twofish/CBC" },
159  { "1.3.6.1.4.1.25258.3.4.1", "AES-128/SIV" },
160  { "1.3.6.1.4.1.25258.3.4.2", "AES-192/SIV" },
161  { "1.3.6.1.4.1.25258.3.4.3", "AES-256/SIV" },
162  { "1.3.6.1.4.1.25258.3.4.4", "Serpent/SIV" },
163  { "1.3.6.1.4.1.25258.3.4.5", "Twofish/SIV" },
164  { "1.3.6.1.4.1.25258.3.4.6", "Camellia-128/SIV" },
165  { "1.3.6.1.4.1.25258.3.4.7", "Camellia-192/SIV" },
166  { "1.3.6.1.4.1.25258.3.4.8", "Camellia-256/SIV" },
167  { "1.3.6.1.4.1.25258.3.4.9", "SM4/SIV" },
168  { "1.3.6.1.4.1.3029.1.2.1", "ElGamal" },
169  { "1.3.6.1.4.1.3029.1.5.1", "OpenPGP.Curve25519" },
170  { "1.3.6.1.4.1.311.20.2.2", "Microsoft SmartcardLogon" },
171  { "1.3.6.1.4.1.311.20.2.3", "Microsoft UPN" },
172  { "1.3.6.1.4.1.8301.3.1.2.9.0.38", "secp521r1" },
173  { "1.3.6.1.5.5.7.1.1", "PKIX.AuthorityInformationAccess" },
174  { "1.3.6.1.5.5.7.3.1", "PKIX.ServerAuth" },
175  { "1.3.6.1.5.5.7.3.2", "PKIX.ClientAuth" },
176  { "1.3.6.1.5.5.7.3.3", "PKIX.CodeSigning" },
177  { "1.3.6.1.5.5.7.3.4", "PKIX.EmailProtection" },
178  { "1.3.6.1.5.5.7.3.5", "PKIX.IPsecEndSystem" },
179  { "1.3.6.1.5.5.7.3.6", "PKIX.IPsecTunnel" },
180  { "1.3.6.1.5.5.7.3.7", "PKIX.IPsecUser" },
181  { "1.3.6.1.5.5.7.3.8", "PKIX.TimeStamping" },
182  { "1.3.6.1.5.5.7.3.9", "PKIX.OCSPSigning" },
183  { "1.3.6.1.5.5.7.48.1", "PKIX.OCSP" },
184  { "1.3.6.1.5.5.7.48.1.1", "PKIX.OCSP.BasicResponse" },
185  { "1.3.6.1.5.5.7.48.2", "PKIX.CertificateAuthorityIssuers" },
186  { "1.3.6.1.5.5.7.8.5", "PKIX.XMPPAddr" },
187  { "2.16.840.1.101.3.4.1.2", "AES-128/CBC" },
188  { "2.16.840.1.101.3.4.1.22", "AES-192/CBC" },
189  { "2.16.840.1.101.3.4.1.25", "KeyWrap.AES-192" },
190  { "2.16.840.1.101.3.4.1.26", "AES-192/GCM" },
191  { "2.16.840.1.101.3.4.1.27", "AES-192/CCM" },
192  { "2.16.840.1.101.3.4.1.42", "AES-256/CBC" },
193  { "2.16.840.1.101.3.4.1.45", "KeyWrap.AES-256" },
194  { "2.16.840.1.101.3.4.1.46", "AES-256/GCM" },
195  { "2.16.840.1.101.3.4.1.47", "AES-256/CCM" },
196  { "2.16.840.1.101.3.4.1.5", "KeyWrap.AES-128" },
197  { "2.16.840.1.101.3.4.1.6", "AES-128/GCM" },
198  { "2.16.840.1.101.3.4.1.7", "AES-128/CCM" },
199  { "2.16.840.1.101.3.4.2.1", "SHA-256" },
200  { "2.16.840.1.101.3.4.2.10", "SHA-3(512)" },
201  { "2.16.840.1.101.3.4.2.11", "SHAKE-128" },
202  { "2.16.840.1.101.3.4.2.12", "SHAKE-256" },
203  { "2.16.840.1.101.3.4.2.2", "SHA-384" },
204  { "2.16.840.1.101.3.4.2.3", "SHA-512" },
205  { "2.16.840.1.101.3.4.2.4", "SHA-224" },
206  { "2.16.840.1.101.3.4.2.6", "SHA-512-256" },
207  { "2.16.840.1.101.3.4.2.7", "SHA-3(224)" },
208  { "2.16.840.1.101.3.4.2.8", "SHA-3(256)" },
209  { "2.16.840.1.101.3.4.2.9", "SHA-3(384)" },
210  { "2.16.840.1.101.3.4.3.1", "DSA/EMSA1(SHA-224)" },
211  { "2.16.840.1.101.3.4.3.10", "ECDSA/EMSA1(SHA-3(256))" },
212  { "2.16.840.1.101.3.4.3.11", "ECDSA/EMSA1(SHA-3(384))" },
213  { "2.16.840.1.101.3.4.3.12", "ECDSA/EMSA1(SHA-3(512))" },
214  { "2.16.840.1.101.3.4.3.13", "RSA/EMSA3(SHA-3(224))" },
215  { "2.16.840.1.101.3.4.3.14", "RSA/EMSA3(SHA-3(256))" },
216  { "2.16.840.1.101.3.4.3.15", "RSA/EMSA3(SHA-3(384))" },
217  { "2.16.840.1.101.3.4.3.16", "RSA/EMSA3(SHA-3(512))" },
218  { "2.16.840.1.101.3.4.3.2", "DSA/EMSA1(SHA-256)" },
219  { "2.16.840.1.101.3.4.3.3", "DSA/EMSA1(SHA-384)" },
220  { "2.16.840.1.101.3.4.3.4", "DSA/EMSA1(SHA-512)" },
221  { "2.16.840.1.101.3.4.3.5", "DSA/EMSA1(SHA-3(224))" },
222  { "2.16.840.1.101.3.4.3.6", "DSA/EMSA1(SHA-3(256))" },
223  { "2.16.840.1.101.3.4.3.7", "DSA/EMSA1(SHA-3(384))" },
224  { "2.16.840.1.101.3.4.3.8", "DSA/EMSA1(SHA-3(512))" },
225  { "2.16.840.1.101.3.4.3.9", "ECDSA/EMSA1(SHA-3(224))" },
226  { "2.16.840.1.113730.1.13", "Certificate Comment" },
227  { "2.5.29.14", "X509v3.SubjectKeyIdentifier" },
228  { "2.5.29.15", "X509v3.KeyUsage" },
229  { "2.5.29.16", "X509v3.PrivateKeyUsagePeriod" },
230  { "2.5.29.17", "X509v3.SubjectAlternativeName" },
231  { "2.5.29.18", "X509v3.IssuerAlternativeName" },
232  { "2.5.29.19", "X509v3.BasicConstraints" },
233  { "2.5.29.20", "X509v3.CRLNumber" },
234  { "2.5.29.21", "X509v3.ReasonCode" },
235  { "2.5.29.23", "X509v3.HoldInstructionCode" },
236  { "2.5.29.24", "X509v3.InvalidityDate" },
237  { "2.5.29.28", "X509v3.CRLIssuingDistributionPoint" },
238  { "2.5.29.30", "X509v3.NameConstraints" },
239  { "2.5.29.31", "X509v3.CRLDistributionPoints" },
240  { "2.5.29.32", "X509v3.CertificatePolicies" },
241  { "2.5.29.32.0", "X509v3.AnyPolicy" },
242  { "2.5.29.35", "X509v3.AuthorityKeyIdentifier" },
243  { "2.5.29.36", "X509v3.PolicyConstraints" },
244  { "2.5.29.37", "X509v3.ExtendedKeyUsage" },
245  { "2.5.4.10", "X520.Organization" },
246  { "2.5.4.11", "X520.OrganizationalUnit" },
247  { "2.5.4.12", "X520.Title" },
248  { "2.5.4.3", "X520.CommonName" },
249  { "2.5.4.4", "X520.Surname" },
250  { "2.5.4.42", "X520.GivenName" },
251  { "2.5.4.43", "X520.Initials" },
252  { "2.5.4.44", "X520.GenerationalQualifier" },
253  { "2.5.4.46", "X520.DNQualifier" },
254  { "2.5.4.5", "X520.SerialNumber" },
255  { "2.5.4.6", "X520.Country" },
256  { "2.5.4.65", "X520.Pseudonym" },
257  { "2.5.4.7", "X520.Locality" },
258  { "2.5.4.8", "X520.State" },
259  { "2.5.4.9", "X520.StreetAddress" },
260  { "2.5.8.1.1", "RSA" }
261  };
262  }

◆ load_str2oid_map()

std::unordered_map< std::string, OID > Botan::OIDS::load_str2oid_map ( )

Definition at line 264 of file oid_maps.cpp.

265  {
266  return std::unordered_map<std::string,OID>{
267  { "AES-128/CBC", OID({2,16,840,1,101,3,4,1,2}) },
268  { "AES-128/CCM", OID({2,16,840,1,101,3,4,1,7}) },
269  { "AES-128/GCM", OID({2,16,840,1,101,3,4,1,6}) },
270  { "AES-128/OCB", OID({1,3,6,1,4,1,25258,3,2,1}) },
271  { "AES-128/SIV", OID({1,3,6,1,4,1,25258,3,4,1}) },
272  { "AES-192/CBC", OID({2,16,840,1,101,3,4,1,22}) },
273  { "AES-192/CCM", OID({2,16,840,1,101,3,4,1,27}) },
274  { "AES-192/GCM", OID({2,16,840,1,101,3,4,1,26}) },
275  { "AES-192/OCB", OID({1,3,6,1,4,1,25258,3,2,2}) },
276  { "AES-192/SIV", OID({1,3,6,1,4,1,25258,3,4,2}) },
277  { "AES-256/CBC", OID({2,16,840,1,101,3,4,1,42}) },
278  { "AES-256/CCM", OID({2,16,840,1,101,3,4,1,47}) },
279  { "AES-256/GCM", OID({2,16,840,1,101,3,4,1,46}) },
280  { "AES-256/OCB", OID({1,3,6,1,4,1,25258,3,2,3}) },
281  { "AES-256/SIV", OID({1,3,6,1,4,1,25258,3,4,3}) },
282  { "CAST-128/CBC", OID({1,2,840,113533,7,66,10}) },
283  { "Camellia-128/CBC", OID({1,2,392,200011,61,1,1,1,2}) },
284  { "Camellia-128/GCM", OID({0,3,4401,5,3,1,9,6}) },
285  { "Camellia-128/OCB", OID({1,3,6,1,4,1,25258,3,2,6}) },
286  { "Camellia-128/SIV", OID({1,3,6,1,4,1,25258,3,4,6}) },
287  { "Camellia-192/CBC", OID({1,2,392,200011,61,1,1,1,3}) },
288  { "Camellia-192/GCM", OID({0,3,4401,5,3,1,9,26}) },
289  { "Camellia-192/OCB", OID({1,3,6,1,4,1,25258,3,2,7}) },
290  { "Camellia-192/SIV", OID({1,3,6,1,4,1,25258,3,4,7}) },
291  { "Camellia-256/CBC", OID({1,2,392,200011,61,1,1,1,4}) },
292  { "Camellia-256/GCM", OID({0,3,4401,5,3,1,9,46}) },
293  { "Camellia-256/OCB", OID({1,3,6,1,4,1,25258,3,2,8}) },
294  { "Camellia-256/SIV", OID({1,3,6,1,4,1,25258,3,4,8}) },
295  { "Certificate Comment", OID({2,16,840,1,113730,1,13}) },
296  { "ChaCha20Poly1305", OID({1,2,840,113549,1,9,16,3,18}) },
297  { "Compression.Zlib", OID({1,2,840,113549,1,9,16,3,8}) },
298  { "Curve25519", OID({1,3,101,110}) },
299  { "DES/CBC", OID({1,3,14,3,2,7}) },
300  { "DH", OID({1,2,840,10046,2,1}) },
301  { "DSA", OID({1,2,840,10040,4,1}) },
302  { "DSA/EMSA1(SHA-160)", OID({1,2,840,10040,4,3}) },
303  { "DSA/EMSA1(SHA-224)", OID({2,16,840,1,101,3,4,3,1}) },
304  { "DSA/EMSA1(SHA-256)", OID({2,16,840,1,101,3,4,3,2}) },
305  { "DSA/EMSA1(SHA-3(224))", OID({2,16,840,1,101,3,4,3,5}) },
306  { "DSA/EMSA1(SHA-3(256))", OID({2,16,840,1,101,3,4,3,6}) },
307  { "DSA/EMSA1(SHA-3(384))", OID({2,16,840,1,101,3,4,3,7}) },
308  { "DSA/EMSA1(SHA-3(512))", OID({2,16,840,1,101,3,4,3,8}) },
309  { "DSA/EMSA1(SHA-384)", OID({2,16,840,1,101,3,4,3,3}) },
310  { "DSA/EMSA1(SHA-512)", OID({2,16,840,1,101,3,4,3,4}) },
311  { "ECDH", OID({1,3,132,1,12}) },
312  { "ECDSA", OID({1,2,840,10045,2,1}) },
313  { "ECDSA/EMSA1(SHA-160)", OID({1,2,840,10045,4,1}) },
314  { "ECDSA/EMSA1(SHA-224)", OID({1,2,840,10045,4,3,1}) },
315  { "ECDSA/EMSA1(SHA-256)", OID({1,2,840,10045,4,3,2}) },
316  { "ECDSA/EMSA1(SHA-3(224))", OID({2,16,840,1,101,3,4,3,9}) },
317  { "ECDSA/EMSA1(SHA-3(256))", OID({2,16,840,1,101,3,4,3,10}) },
318  { "ECDSA/EMSA1(SHA-3(384))", OID({2,16,840,1,101,3,4,3,11}) },
319  { "ECDSA/EMSA1(SHA-3(512))", OID({2,16,840,1,101,3,4,3,12}) },
320  { "ECDSA/EMSA1(SHA-384)", OID({1,2,840,10045,4,3,3}) },
321  { "ECDSA/EMSA1(SHA-512)", OID({1,2,840,10045,4,3,4}) },
322  { "ECGDSA", OID({1,3,36,3,3,2,5,2,1}) },
323  { "ECGDSA/EMSA1(RIPEMD-160)", OID({1,3,36,3,3,2,5,4,1}) },
324  { "ECGDSA/EMSA1(SHA-160)", OID({1,3,36,3,3,2,5,4,2}) },
325  { "ECGDSA/EMSA1(SHA-224)", OID({1,3,36,3,3,2,5,4,3}) },
326  { "ECGDSA/EMSA1(SHA-256)", OID({1,3,36,3,3,2,5,4,4}) },
327  { "ECGDSA/EMSA1(SHA-384)", OID({1,3,36,3,3,2,5,4,5}) },
328  { "ECGDSA/EMSA1(SHA-512)", OID({1,3,36,3,3,2,5,4,6}) },
329  { "ECKCDSA", OID({1,0,14888,3,0,5}) },
330  { "ECKCDSA/EMSA1(SHA-1)", OID({1,2,410,200004,1,100,4,3}) },
331  { "ECKCDSA/EMSA1(SHA-224)", OID({1,2,410,200004,1,100,4,4}) },
332  { "ECKCDSA/EMSA1(SHA-256)", OID({1,2,410,200004,1,100,4,5}) },
333  { "Ed25519", OID({1,3,101,112}) },
334  { "ElGamal", OID({1,3,6,1,4,1,3029,1,2,1}) },
335  { "GOST-34.10", OID({1,2,643,2,2,19}) },
336  { "GOST-34.10-2012-256", OID({1,2,643,7,1,1,1,1}) },
337  { "GOST-34.10-2012-256/EMSA1(SHA-256)", OID({1,3,6,1,4,1,25258,1,6,1}) },
338  { "GOST-34.10-2012-256/EMSA1(Streebog-256)", OID({1,2,643,7,1,1,3,2}) },
339  { "GOST-34.10-2012-512", OID({1,2,643,7,1,1,1,2}) },
340  { "GOST-34.10-2012-512/EMSA1(Streebog-512)", OID({1,2,643,7,1,1,3,3}) },
341  { "GOST-34.10/EMSA1(GOST-R-34.11-94)", OID({1,2,643,2,2,3}) },
342  { "GOST.INN", OID({1,2,643,3,131,1,1}) },
343  { "GOST.IssuerSigningTool", OID({1,2,643,100,112}) },
344  { "GOST.OGRN", OID({1,2,643,100,1}) },
345  { "GOST.SubjectSigningTool", OID({1,2,643,100,111}) },
346  { "HMAC(SHA-160)", OID({1,2,840,113549,2,7}) },
347  { "HMAC(SHA-224)", OID({1,2,840,113549,2,8}) },
348  { "HMAC(SHA-256)", OID({1,2,840,113549,2,9}) },
349  { "HMAC(SHA-384)", OID({1,2,840,113549,2,10}) },
350  { "HMAC(SHA-512)", OID({1,2,840,113549,2,11}) },
351  { "HMAC(SHA-512-256)", OID({1,2,840,113549,2,13}) },
352  { "KeyWrap.AES-128", OID({2,16,840,1,101,3,4,1,5}) },
353  { "KeyWrap.AES-192", OID({2,16,840,1,101,3,4,1,25}) },
354  { "KeyWrap.AES-256", OID({2,16,840,1,101,3,4,1,45}) },
355  { "KeyWrap.CAST-128", OID({1,2,840,113533,7,66,15}) },
356  { "KeyWrap.TripleDES", OID({1,2,840,113549,1,9,16,3,6}) },
357  { "MD5", OID({1,2,840,113549,2,5}) },
358  { "MGF1", OID({1,2,840,113549,1,1,8}) },
359  { "McEliece", OID({1,3,6,1,4,1,25258,1,3}) },
360  { "Microsoft SmartcardLogon", OID({1,3,6,1,4,1,311,20,2,2}) },
361  { "Microsoft UPN", OID({1,3,6,1,4,1,311,20,2,3}) },
362  { "OpenPGP.Curve25519", OID({1,3,6,1,4,1,3029,1,5,1}) },
363  { "OpenPGP.Ed25519", OID({1,3,6,1,4,1,11591,15,1}) },
364  { "PBE-PKCS5v20", OID({1,2,840,113549,1,5,13}) },
365  { "PBES2", OID({1,2,840,113549,1,5,13}) },
366  { "PKCS5.PBKDF2", OID({1,2,840,113549,1,5,12}) },
367  { "PKCS9.ChallengePassword", OID({1,2,840,113549,1,9,7}) },
368  { "PKCS9.ContentType", OID({1,2,840,113549,1,9,3}) },
369  { "PKCS9.EmailAddress", OID({1,2,840,113549,1,9,1}) },
370  { "PKCS9.ExtensionRequest", OID({1,2,840,113549,1,9,14}) },
371  { "PKCS9.MessageDigest", OID({1,2,840,113549,1,9,4}) },
372  { "PKCS9.UnstructuredName", OID({1,2,840,113549,1,9,2}) },
373  { "PKIX.AuthorityInformationAccess", OID({1,3,6,1,5,5,7,1,1}) },
374  { "PKIX.CertificateAuthorityIssuers", OID({1,3,6,1,5,5,7,48,2}) },
375  { "PKIX.ClientAuth", OID({1,3,6,1,5,5,7,3,2}) },
376  { "PKIX.CodeSigning", OID({1,3,6,1,5,5,7,3,3}) },
377  { "PKIX.EmailProtection", OID({1,3,6,1,5,5,7,3,4}) },
378  { "PKIX.IPsecEndSystem", OID({1,3,6,1,5,5,7,3,5}) },
379  { "PKIX.IPsecTunnel", OID({1,3,6,1,5,5,7,3,6}) },
380  { "PKIX.IPsecUser", OID({1,3,6,1,5,5,7,3,7}) },
381  { "PKIX.OCSP", OID({1,3,6,1,5,5,7,48,1}) },
382  { "PKIX.OCSP.BasicResponse", OID({1,3,6,1,5,5,7,48,1,1}) },
383  { "PKIX.OCSPSigning", OID({1,3,6,1,5,5,7,3,9}) },
384  { "PKIX.ServerAuth", OID({1,3,6,1,5,5,7,3,1}) },
385  { "PKIX.TimeStamping", OID({1,3,6,1,5,5,7,3,8}) },
386  { "PKIX.XMPPAddr", OID({1,3,6,1,5,5,7,8,5}) },
387  { "RIPEMD-160", OID({1,3,36,3,2,1}) },
388  { "RSA", OID({1,2,840,113549,1,1,1}) },
389  { "RSA/EMSA3(MD5)", OID({1,2,840,113549,1,1,4}) },
390  { "RSA/EMSA3(RIPEMD-160)", OID({1,3,36,3,3,1,2}) },
391  { "RSA/EMSA3(SHA-160)", OID({1,2,840,113549,1,1,5}) },
392  { "RSA/EMSA3(SHA-224)", OID({1,2,840,113549,1,1,14}) },
393  { "RSA/EMSA3(SHA-256)", OID({1,2,840,113549,1,1,11}) },
394  { "RSA/EMSA3(SHA-3(224))", OID({2,16,840,1,101,3,4,3,13}) },
395  { "RSA/EMSA3(SHA-3(256))", OID({2,16,840,1,101,3,4,3,14}) },
396  { "RSA/EMSA3(SHA-3(384))", OID({2,16,840,1,101,3,4,3,15}) },
397  { "RSA/EMSA3(SHA-3(512))", OID({2,16,840,1,101,3,4,3,16}) },
398  { "RSA/EMSA3(SHA-384)", OID({1,2,840,113549,1,1,12}) },
399  { "RSA/EMSA3(SHA-512)", OID({1,2,840,113549,1,1,13}) },
400  { "RSA/EMSA3(SHA-512-256)", OID({1,2,840,113549,1,1,16}) },
401  { "RSA/EMSA3(SM3)", OID({1,2,156,10197,1,504}) },
402  { "RSA/EMSA4", OID({1,2,840,113549,1,1,10}) },
403  { "RSA/OAEP", OID({1,2,840,113549,1,1,7}) },
404  { "SEED/CBC", OID({1,2,410,200004,1,4}) },
405  { "SHA-160", OID({1,3,14,3,2,26}) },
406  { "SHA-224", OID({2,16,840,1,101,3,4,2,4}) },
407  { "SHA-256", OID({2,16,840,1,101,3,4,2,1}) },
408  { "SHA-3(224)", OID({2,16,840,1,101,3,4,2,7}) },
409  { "SHA-3(256)", OID({2,16,840,1,101,3,4,2,8}) },
410  { "SHA-3(384)", OID({2,16,840,1,101,3,4,2,9}) },
411  { "SHA-3(512)", OID({2,16,840,1,101,3,4,2,10}) },
412  { "SHA-384", OID({2,16,840,1,101,3,4,2,2}) },
413  { "SHA-512", OID({2,16,840,1,101,3,4,2,3}) },
414  { "SHA-512-256", OID({2,16,840,1,101,3,4,2,6}) },
415  { "SHAKE-128", OID({2,16,840,1,101,3,4,2,11}) },
416  { "SHAKE-256", OID({2,16,840,1,101,3,4,2,12}) },
417  { "SM2", OID({1,2,156,10197,1,301,1}) },
418  { "SM2_Enc", OID({1,2,156,10197,1,301,3}) },
419  { "SM2_Kex", OID({1,2,156,10197,1,301,2}) },
420  { "SM2_Sig", OID({1,2,156,10197,1,301,1}) },
421  { "SM2_Sig/SM3", OID({1,2,156,10197,1,501}) },
422  { "SM3", OID({1,2,156,10197,1,401}) },
423  { "SM4/CBC", OID({1,2,156,10197,1,104,2}) },
424  { "SM4/GCM", OID({1,2,156,10197,1,104,8}) },
425  { "SM4/OCB", OID({1,2,156,10197,1,104,100}) },
426  { "SM4/SIV", OID({1,3,6,1,4,1,25258,3,4,9}) },
427  { "Scrypt", OID({1,3,6,1,4,1,11591,4,11}) },
428  { "Serpent/CBC", OID({1,3,6,1,4,1,25258,3,1}) },
429  { "Serpent/GCM", OID({1,3,6,1,4,1,25258,3,101}) },
430  { "Serpent/OCB", OID({1,3,6,1,4,1,25258,3,2,4}) },
431  { "Serpent/SIV", OID({1,3,6,1,4,1,25258,3,4,4}) },
432  { "Streebog-256", OID({1,2,643,7,1,1,2,2}) },
433  { "Streebog-512", OID({1,2,643,7,1,1,2,3}) },
434  { "Threefish-512/CBC", OID({1,3,6,1,4,1,25258,3,2}) },
435  { "Tiger(24,3)", OID({1,3,6,1,4,1,11591,12,2}) },
436  { "TripleDES/CBC", OID({1,2,840,113549,3,7}) },
437  { "Twofish/CBC", OID({1,3,6,1,4,1,25258,3,3}) },
438  { "Twofish/GCM", OID({1,3,6,1,4,1,25258,3,102}) },
439  { "Twofish/OCB", OID({1,3,6,1,4,1,25258,3,2,5}) },
440  { "Twofish/SIV", OID({1,3,6,1,4,1,25258,3,4,5}) },
441  { "X509v3.AnyPolicy", OID({2,5,29,32,0}) },
442  { "X509v3.AuthorityKeyIdentifier", OID({2,5,29,35}) },
443  { "X509v3.BasicConstraints", OID({2,5,29,19}) },
444  { "X509v3.CRLDistributionPoints", OID({2,5,29,31}) },
445  { "X509v3.CRLIssuingDistributionPoint", OID({2,5,29,28}) },
446  { "X509v3.CRLNumber", OID({2,5,29,20}) },
447  { "X509v3.CertificatePolicies", OID({2,5,29,32}) },
448  { "X509v3.ExtendedKeyUsage", OID({2,5,29,37}) },
449  { "X509v3.HoldInstructionCode", OID({2,5,29,23}) },
450  { "X509v3.InvalidityDate", OID({2,5,29,24}) },
451  { "X509v3.IssuerAlternativeName", OID({2,5,29,18}) },
452  { "X509v3.KeyUsage", OID({2,5,29,15}) },
453  { "X509v3.NameConstraints", OID({2,5,29,30}) },
454  { "X509v3.PolicyConstraints", OID({2,5,29,36}) },
455  { "X509v3.PrivateKeyUsagePeriod", OID({2,5,29,16}) },
456  { "X509v3.ReasonCode", OID({2,5,29,21}) },
457  { "X509v3.SubjectAlternativeName", OID({2,5,29,17}) },
458  { "X509v3.SubjectKeyIdentifier", OID({2,5,29,14}) },
459  { "X520.CommonName", OID({2,5,4,3}) },
460  { "X520.Country", OID({2,5,4,6}) },
461  { "X520.DNQualifier", OID({2,5,4,46}) },
462  { "X520.GenerationalQualifier", OID({2,5,4,44}) },
463  { "X520.GivenName", OID({2,5,4,42}) },
464  { "X520.Initials", OID({2,5,4,43}) },
465  { "X520.Locality", OID({2,5,4,7}) },
466  { "X520.Organization", OID({2,5,4,10}) },
467  { "X520.OrganizationalUnit", OID({2,5,4,11}) },
468  { "X520.Pseudonym", OID({2,5,4,65}) },
469  { "X520.SerialNumber", OID({2,5,4,5}) },
470  { "X520.State", OID({2,5,4,8}) },
471  { "X520.StreetAddress", OID({2,5,4,9}) },
472  { "X520.Surname", OID({2,5,4,4}) },
473  { "X520.Title", OID({2,5,4,12}) },
474  { "XMSS", OID({0,4,0,127,0,15,1,1,13,0}) },
475  { "XMSS-draft12", OID({1,3,6,1,4,1,25258,1,8}) },
476  { "XMSS-draft6", OID({1,3,6,1,4,1,25258,1,5}) },
477  { "brainpool160r1", OID({1,3,36,3,3,2,8,1,1,1}) },
478  { "brainpool192r1", OID({1,3,36,3,3,2,8,1,1,3}) },
479  { "brainpool224r1", OID({1,3,36,3,3,2,8,1,1,5}) },
480  { "brainpool256r1", OID({1,3,36,3,3,2,8,1,1,7}) },
481  { "brainpool320r1", OID({1,3,36,3,3,2,8,1,1,9}) },
482  { "brainpool384r1", OID({1,3,36,3,3,2,8,1,1,11}) },
483  { "brainpool512r1", OID({1,3,36,3,3,2,8,1,1,13}) },
484  { "frp256v1", OID({1,2,250,1,223,101,256,1}) },
485  { "gost_256A", OID({1,2,643,7,1,2,1,1,1}) },
486  { "gost_256B", OID({1,2,643,7,1,2,1,1,2}) },
487  { "gost_512A", OID({1,2,643,7,1,2,1,2,1}) },
488  { "gost_512B", OID({1,2,643,7,1,2,1,2,2}) },
489  { "secp160k1", OID({1,3,132,0,9}) },
490  { "secp160r1", OID({1,3,132,0,8}) },
491  { "secp160r2", OID({1,3,132,0,30}) },
492  { "secp192k1", OID({1,3,132,0,31}) },
493  { "secp192r1", OID({1,2,840,10045,3,1,1}) },
494  { "secp224k1", OID({1,3,132,0,32}) },
495  { "secp224r1", OID({1,3,132,0,33}) },
496  { "secp256k1", OID({1,3,132,0,10}) },
497  { "secp256r1", OID({1,2,840,10045,3,1,7}) },
498  { "secp384r1", OID({1,3,132,0,34}) },
499  { "secp521r1", OID({1,3,132,0,35}) },
500  { "sm2p256v1", OID({1,2,156,10197,1,301}) },
501  { "x962_p192v2", OID({1,2,840,10045,3,1,2}) },
502  { "x962_p192v3", OID({1,2,840,10045,3,1,3}) },
503  { "x962_p239v1", OID({1,2,840,10045,3,1,4}) },
504  { "x962_p239v2", OID({1,2,840,10045,3,1,5}) },
505  { "x962_p239v3", OID({1,2,840,10045,3,1,6}) }
506  };
507  }

◆ lookup() [1/2]

std::string Botan::OIDS::lookup ( const OID oid)
inline

Prefer oid2str_or_empty

Definition at line 71 of file oids.h.

References oid2str_or_empty().

72  {
73  return oid2str_or_empty(oid);
74  }
BOTAN_UNSTABLE_API std::string oid2str_or_empty(const OID &oid)
Definition: oids.cpp:111

◆ lookup() [2/2]

OID Botan::OIDS::lookup ( const std::string &  name)
inline

Prefer str2oid_or_empty

Definition at line 79 of file oids.h.

References name, and str2oid_or_empty().

80  {
81  return str2oid_or_empty(name);
82  }
BOTAN_UNSTABLE_API OID str2oid_or_empty(const std::string &name)
Definition: oids.cpp:116
std::string name

◆ name_of()

bool Botan::OIDS::name_of ( const OID oid,
const std::string &  name 
)
inline

Tests whether the specified OID stands for the specified name.

Parameters
oidthe OID to check
namethe name to check
Returns
true if the specified OID stands for the specified name

Definition at line 63 of file oids.h.

References name, and str2oid_or_empty().

64  {
65  return (oid == str2oid_or_empty(name));
66  }
BOTAN_UNSTABLE_API OID str2oid_or_empty(const std::string &name)
Definition: oids.cpp:116
std::string name

◆ oid2str()

std::string Botan::OIDS::oid2str ( const OID oid)
inline

Definition at line 84 of file oids.h.

References oid2str_or_empty().

85  {
86  return oid2str_or_empty(oid);
87  }
BOTAN_UNSTABLE_API std::string oid2str_or_empty(const OID &oid)
Definition: oids.cpp:111

◆ oid2str_or_empty()

std::string Botan::OIDS::oid2str_or_empty ( const OID oid)

Resolve an OID

Parameters
oidthe OID to look up
Returns
name associated with this OID, or an empty string

Definition at line 111 of file oids.cpp.

Referenced by Botan::PKIX::check_chain(), Botan::PKIX::check_crl(), lookup(), oid2str(), oid2str_or_throw(), and Botan::OID::to_formatted_string().

112  {
113  return OID_Map::global_registry().oid2str(oid);
114  }

◆ oid2str_or_throw()

std::string Botan::OIDS::oid2str_or_throw ( const OID oid)

Definition at line 121 of file oids.cpp.

References oid2str_or_empty(), and Botan::OID::to_string().

Referenced by Botan::pbes2_decrypt(), and Botan::X509_CA::X509_CA().

122  {
123  const std::string s = OIDS::oid2str_or_empty(oid);
124  if(s.empty())
125  throw Lookup_Error("No name associated with OID " + oid.to_string());
126  return s;
127  }
BOTAN_UNSTABLE_API std::string oid2str_or_empty(const OID &oid)
Definition: oids.cpp:111

◆ str2oid()

OID Botan::OIDS::str2oid ( const std::string &  name)
inline

Definition at line 89 of file oids.h.

References name, and str2oid_or_empty().

90  {
91  return str2oid_or_empty(name);
92  }
BOTAN_UNSTABLE_API OID str2oid_or_empty(const std::string &name)
Definition: oids.cpp:116
std::string name

◆ str2oid_or_empty()

OID Botan::OIDS::str2oid_or_empty ( const std::string &  name)

Find the OID to a name. The lookup will be performed in the general OID section of the configuration.

Parameters
namethe name to resolve
Returns
OID associated with the specified name

Definition at line 116 of file oids.cpp.

References name.

Referenced by Botan::OID::from_string(), Botan::Public_Key::get_oid(), Botan::X509_DN::has_field(), lookup(), name_of(), and str2oid().

117  {
118  return OID_Map::global_registry().str2oid(name);
119  }
std::string name