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

Functions

void add_oid (const OID &oid, const std::string &name)
 
void add_oid2str (const OID &oid, const std::string &name)
 
void add_oidstr (const char *oidstr, const char *name)
 
void add_str2oid (const OID &oid, const std::string &name)
 
bool have_oid (const std::string &name)
 
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)
 
OID str2oid (const std::string &name)
 

Function Documentation

◆ add_oid()

BOTAN_UNSTABLE_API 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 93 of file oids.cpp.

Referenced by add_oidstr().

94  {
95  OID_Map::global_registry().add_oid(oid, name);
96  }

◆ add_oid2str()

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

Definition at line 103 of file oids.cpp.

104  {
105  OID_Map::global_registry().add_oid2str(oid, name);
106  }

◆ add_oidstr()

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

Definition at line 98 of file oids.cpp.

References add_oid().

99  {
100  add_oid(OID(oidstr), name);
101  }
void add_oid(const OID &oid, const std::string &name)
Definition: oids.cpp:93

◆ add_str2oid()

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

Definition at line 108 of file oids.cpp.

109  {
110  OID_Map::global_registry().add_str2oid(oid, name);
111  }

◆ have_oid()

BOTAN_UNSTABLE_API 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 123 of file oids.cpp.

Referenced by Botan::X942_PRF::X942_PRF().

124  {
125  return OID_Map::global_registry().have_oid(name);
126  }

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

◆ load_str2oid_map()

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

Definition at line 221 of file oid_maps.cpp.

222  {
223  return std::unordered_map<std::string,OID>{
224  { "AES-128/CBC", OID({2,16,840,1,101,3,4,1,2}) },
225  { "AES-128/CCM", OID({2,16,840,1,101,3,4,1,7}) },
226  { "AES-128/GCM", OID({2,16,840,1,101,3,4,1,6}) },
227  { "AES-128/OCB", OID({1,3,6,1,4,1,25258,3,2,1}) },
228  { "AES-192/CBC", OID({2,16,840,1,101,3,4,1,22}) },
229  { "AES-192/CCM", OID({2,16,840,1,101,3,4,1,27}) },
230  { "AES-192/GCM", OID({2,16,840,1,101,3,4,1,26}) },
231  { "AES-192/OCB", OID({1,3,6,1,4,1,25258,3,2,2}) },
232  { "AES-256/CBC", OID({2,16,840,1,101,3,4,1,42}) },
233  { "AES-256/CCM", OID({2,16,840,1,101,3,4,1,47}) },
234  { "AES-256/GCM", OID({2,16,840,1,101,3,4,1,46}) },
235  { "AES-256/OCB", OID({1,3,6,1,4,1,25258,3,2,3}) },
236  { "CAST-128/CBC", OID({1,2,840,113533,7,66,10}) },
237  { "Compression.Zlib", OID({1,2,840,113549,1,9,16,3,8}) },
238  { "Curve25519", OID({1,3,101,110}) },
239  { "DES/CBC", OID({1,3,14,3,2,7}) },
240  { "DH", OID({1,2,840,10046,2,1}) },
241  { "DSA", OID({1,2,840,10040,4,1}) },
242  { "DSA/EMSA1(SHA-160)", OID({1,2,840,10040,4,3}) },
243  { "DSA/EMSA1(SHA-224)", OID({2,16,840,1,101,3,4,3,1}) },
244  { "DSA/EMSA1(SHA-256)", OID({2,16,840,1,101,3,4,3,2}) },
245  { "DSA/EMSA1(SHA-3(224))", OID({2,16,840,1,101,3,4,3,5}) },
246  { "DSA/EMSA1(SHA-3(256))", OID({2,16,840,1,101,3,4,3,6}) },
247  { "DSA/EMSA1(SHA-3(384))", OID({2,16,840,1,101,3,4,3,7}) },
248  { "DSA/EMSA1(SHA-3(512))", OID({2,16,840,1,101,3,4,3,8}) },
249  { "DSA/EMSA1(SHA-384)", OID({2,16,840,1,101,3,4,3,3}) },
250  { "DSA/EMSA1(SHA-512)", OID({2,16,840,1,101,3,4,3,4}) },
251  { "ECDH", OID({1,3,132,1,12}) },
252  { "ECDSA", OID({1,2,840,10045,2,1}) },
253  { "ECDSA/EMSA1(SHA-160)", OID({1,2,840,10045,4,1}) },
254  { "ECDSA/EMSA1(SHA-224)", OID({1,2,840,10045,4,3,1}) },
255  { "ECDSA/EMSA1(SHA-256)", OID({1,2,840,10045,4,3,2}) },
256  { "ECDSA/EMSA1(SHA-3(224))", OID({2,16,840,1,101,3,4,3,9}) },
257  { "ECDSA/EMSA1(SHA-3(256))", OID({2,16,840,1,101,3,4,3,10}) },
258  { "ECDSA/EMSA1(SHA-3(384))", OID({2,16,840,1,101,3,4,3,11}) },
259  { "ECDSA/EMSA1(SHA-3(512))", OID({2,16,840,1,101,3,4,3,12}) },
260  { "ECDSA/EMSA1(SHA-384)", OID({1,2,840,10045,4,3,3}) },
261  { "ECDSA/EMSA1(SHA-512)", OID({1,2,840,10045,4,3,4}) },
262  { "ECGDSA", OID({1,3,36,3,3,2,5,2,1}) },
263  { "ECGDSA/EMSA1(RIPEMD-160)", OID({1,3,36,3,3,2,5,4,1}) },
264  { "ECGDSA/EMSA1(SHA-160)", OID({1,3,36,3,3,2,5,4,2}) },
265  { "ECGDSA/EMSA1(SHA-224)", OID({1,3,36,3,3,2,5,4,3}) },
266  { "ECGDSA/EMSA1(SHA-256)", OID({1,3,36,3,3,2,5,4,4}) },
267  { "ECGDSA/EMSA1(SHA-384)", OID({1,3,36,3,3,2,5,4,5}) },
268  { "ECGDSA/EMSA1(SHA-512)", OID({1,3,36,3,3,2,5,4,6}) },
269  { "ECKCDSA", OID({1,0,14888,3,0,5}) },
270  { "ECKCDSA/EMSA1(SHA-1)", OID({1,2,410,200004,1,100,4,3}) },
271  { "ECKCDSA/EMSA1(SHA-224)", OID({1,2,410,200004,1,100,4,4}) },
272  { "ECKCDSA/EMSA1(SHA-256)", OID({1,2,410,200004,1,100,4,5}) },
273  { "Ed25519", OID({1,3,101,112}) },
274  { "ElGamal", OID({1,3,6,1,4,1,3029,1,2,1}) },
275  { "GOST-34.10", OID({1,2,643,2,2,19}) },
276  { "GOST-34.10/EMSA1(GOST-R-34.11-94)", OID({1,2,643,2,2,3}) },
277  { "GOST-34.10/EMSA1(SHA-256)", OID({1,3,6,1,4,1,25258,1,6,1}) },
278  { "HMAC(SHA-160)", OID({1,2,840,113549,2,7}) },
279  { "HMAC(SHA-224)", OID({1,2,840,113549,2,8}) },
280  { "HMAC(SHA-256)", OID({1,2,840,113549,2,9}) },
281  { "HMAC(SHA-384)", OID({1,2,840,113549,2,10}) },
282  { "HMAC(SHA-512)", OID({1,2,840,113549,2,11}) },
283  { "KeyWrap.AES-128", OID({2,16,840,1,101,3,4,1,5}) },
284  { "KeyWrap.AES-192", OID({2,16,840,1,101,3,4,1,25}) },
285  { "KeyWrap.AES-256", OID({2,16,840,1,101,3,4,1,45}) },
286  { "KeyWrap.CAST-128", OID({1,2,840,113533,7,66,15}) },
287  { "KeyWrap.RC2", OID({1,2,840,113549,1,9,16,3,7}) },
288  { "KeyWrap.TripleDES", OID({1,2,840,113549,1,9,16,3,6}) },
289  { "MD5", OID({1,2,840,113549,2,5}) },
290  { "MGF1", OID({1,2,840,113549,1,1,8}) },
291  { "McEliece", OID({1,3,6,1,4,1,25258,1,3}) },
292  { "Microsoft SmartcardLogon", OID({1,3,6,1,4,1,311,20,2,2}) },
293  { "PBE-PKCS5v20", OID({1,2,840,113549,1,5,13}) },
294  { "PKCS5.PBKDF2", OID({1,2,840,113549,1,5,12}) },
295  { "PKCS9.ChallengePassword", OID({1,2,840,113549,1,9,7}) },
296  { "PKCS9.ContentType", OID({1,2,840,113549,1,9,3}) },
297  { "PKCS9.EmailAddress", OID({1,2,840,113549,1,9,1}) },
298  { "PKCS9.ExtensionRequest", OID({1,2,840,113549,1,9,14}) },
299  { "PKCS9.MessageDigest", OID({1,2,840,113549,1,9,4}) },
300  { "PKCS9.UnstructuredName", OID({1,2,840,113549,1,9,2}) },
301  { "PKIX.AuthorityInformationAccess", OID({1,3,6,1,5,5,7,1,1}) },
302  { "PKIX.CertificateAuthorityIssuers", OID({1,3,6,1,5,5,7,48,2}) },
303  { "PKIX.ClientAuth", OID({1,3,6,1,5,5,7,3,2}) },
304  { "PKIX.CodeSigning", OID({1,3,6,1,5,5,7,3,3}) },
305  { "PKIX.EmailProtection", OID({1,3,6,1,5,5,7,3,4}) },
306  { "PKIX.IPsecEndSystem", OID({1,3,6,1,5,5,7,3,5}) },
307  { "PKIX.IPsecTunnel", OID({1,3,6,1,5,5,7,3,6}) },
308  { "PKIX.IPsecUser", OID({1,3,6,1,5,5,7,3,7}) },
309  { "PKIX.OCSP", OID({1,3,6,1,5,5,7,48,1}) },
310  { "PKIX.OCSP.BasicResponse", OID({1,3,6,1,5,5,7,48,1,1}) },
311  { "PKIX.OCSPSigning", OID({1,3,6,1,5,5,7,3,9}) },
312  { "PKIX.ServerAuth", OID({1,3,6,1,5,5,7,3,1}) },
313  { "PKIX.TimeStamping", OID({1,3,6,1,5,5,7,3,8}) },
314  { "PKIX.XMPPAddr", OID({1,3,6,1,5,5,7,8,5}) },
315  { "RC2/CBC", OID({1,2,840,113549,3,2}) },
316  { "RIPEMD-160", OID({1,3,36,3,2,1}) },
317  { "RSA", OID({1,2,840,113549,1,1,1}) },
318  { "RSA/EMSA3(MD5)", OID({1,2,840,113549,1,1,4}) },
319  { "RSA/EMSA3(RIPEMD-160)", OID({1,3,36,3,3,1,2}) },
320  { "RSA/EMSA3(SHA-160)", OID({1,2,840,113549,1,1,5}) },
321  { "RSA/EMSA3(SHA-224)", OID({1,2,840,113549,1,1,14}) },
322  { "RSA/EMSA3(SHA-256)", OID({1,2,840,113549,1,1,11}) },
323  { "RSA/EMSA3(SHA-3(224))", OID({2,16,840,1,101,3,4,3,13}) },
324  { "RSA/EMSA3(SHA-3(256))", OID({2,16,840,1,101,3,4,3,14}) },
325  { "RSA/EMSA3(SHA-3(384))", OID({2,16,840,1,101,3,4,3,15}) },
326  { "RSA/EMSA3(SHA-3(512))", OID({2,16,840,1,101,3,4,3,16}) },
327  { "RSA/EMSA3(SHA-384)", OID({1,2,840,113549,1,1,12}) },
328  { "RSA/EMSA3(SHA-512)", OID({1,2,840,113549,1,1,13}) },
329  { "RSA/EMSA3(SHA-512-256)", OID({1,2,840,113549,1,1,16}) },
330  { "RSA/EMSA3(SM3)", OID({1,2,156,10197,1,504}) },
331  { "RSA/EMSA4", OID({1,2,840,113549,1,1,10}) },
332  { "RSA/OAEP", OID({1,2,840,113549,1,1,7}) },
333  { "SEED/CBC", OID({1,2,410,200004,1,4}) },
334  { "SHA-160", OID({1,3,14,3,2,26}) },
335  { "SHA-224", OID({2,16,840,1,101,3,4,2,4}) },
336  { "SHA-256", OID({2,16,840,1,101,3,4,2,1}) },
337  { "SHA-3(224)", OID({2,16,840,1,101,3,4,2,7}) },
338  { "SHA-3(256)", OID({2,16,840,1,101,3,4,2,8}) },
339  { "SHA-3(384)", OID({2,16,840,1,101,3,4,2,9}) },
340  { "SHA-3(512)", OID({2,16,840,1,101,3,4,2,10}) },
341  { "SHA-384", OID({2,16,840,1,101,3,4,2,2}) },
342  { "SHA-512", OID({2,16,840,1,101,3,4,2,3}) },
343  { "SHA-512-256", OID({2,16,840,1,101,3,4,2,6}) },
344  { "SHAKE-128", OID({2,16,840,1,101,3,4,2,11}) },
345  { "SHAKE-256", OID({2,16,840,1,101,3,4,2,12}) },
346  { "SM2_Enc", OID({1,2,156,10197,1,301,3}) },
347  { "SM2_Kex", OID({1,2,156,10197,1,301,2}) },
348  { "SM2_Sig", OID({1,2,156,10197,1,301,1}) },
349  { "SM3", OID({1,2,156,10197,1,401}) },
350  { "Serpent/CBC", OID({1,3,6,1,4,1,25258,3,1}) },
351  { "Serpent/GCM", OID({1,3,6,1,4,1,25258,3,101}) },
352  { "Serpent/OCB", OID({1,3,6,1,4,1,25258,3,2,4}) },
353  { "Streebog-256", OID({1,2,643,7,1,1,2,2}) },
354  { "Streebog-512", OID({1,2,643,7,1,1,2,3}) },
355  { "Threefish-512/CBC", OID({1,3,6,1,4,1,25258,3,2}) },
356  { "Tiger(24,3)", OID({1,3,6,1,4,1,11591,12,2}) },
357  { "TripleDES/CBC", OID({1,2,840,113549,3,7}) },
358  { "Twofish/CBC", OID({1,3,6,1,4,1,25258,3,3}) },
359  { "Twofish/GCM", OID({1,3,6,1,4,1,25258,3,102}) },
360  { "Twofish/OCB", OID({1,3,6,1,4,1,25258,3,2,5}) },
361  { "X509v3.AnyPolicy", OID({2,5,29,32,0}) },
362  { "X509v3.AuthorityKeyIdentifier", OID({2,5,29,35}) },
363  { "X509v3.BasicConstraints", OID({2,5,29,19}) },
364  { "X509v3.CRLDistributionPoints", OID({2,5,29,31}) },
365  { "X509v3.CRLIssuingDistributionPoint", OID({2,5,29,28}) },
366  { "X509v3.CRLNumber", OID({2,5,29,20}) },
367  { "X509v3.CertificatePolicies", OID({2,5,29,32}) },
368  { "X509v3.ExtendedKeyUsage", OID({2,5,29,37}) },
369  { "X509v3.HoldInstructionCode", OID({2,5,29,23}) },
370  { "X509v3.InvalidityDate", OID({2,5,29,24}) },
371  { "X509v3.IssuerAlternativeName", OID({2,5,29,18}) },
372  { "X509v3.KeyUsage", OID({2,5,29,15}) },
373  { "X509v3.NameConstraints", OID({2,5,29,30}) },
374  { "X509v3.PolicyConstraints", OID({2,5,29,36}) },
375  { "X509v3.ReasonCode", OID({2,5,29,21}) },
376  { "X509v3.SubjectAlternativeName", OID({2,5,29,17}) },
377  { "X509v3.SubjectKeyIdentifier", OID({2,5,29,14}) },
378  { "X520.CommonName", OID({2,5,4,3}) },
379  { "X520.Country", OID({2,5,4,6}) },
380  { "X520.DNQualifier", OID({2,5,4,46}) },
381  { "X520.GenerationalQualifier", OID({2,5,4,44}) },
382  { "X520.GivenName", OID({2,5,4,42}) },
383  { "X520.Initials", OID({2,5,4,43}) },
384  { "X520.Locality", OID({2,5,4,7}) },
385  { "X520.Organization", OID({2,5,4,10}) },
386  { "X520.OrganizationalUnit", OID({2,5,4,11}) },
387  { "X520.Pseudonym", OID({2,5,4,65}) },
388  { "X520.SerialNumber", OID({2,5,4,5}) },
389  { "X520.State", OID({2,5,4,8}) },
390  { "X520.Surname", OID({2,5,4,4}) },
391  { "X520.Title", OID({2,5,4,12}) },
392  { "XMSS", OID({1,3,6,1,4,1,25258,1,5}) },
393  { "brainpool160r1", OID({1,3,36,3,3,2,8,1,1,1}) },
394  { "brainpool192r1", OID({1,3,36,3,3,2,8,1,1,3}) },
395  { "brainpool224r1", OID({1,3,36,3,3,2,8,1,1,5}) },
396  { "brainpool256r1", OID({1,3,36,3,3,2,8,1,1,7}) },
397  { "brainpool320r1", OID({1,3,36,3,3,2,8,1,1,9}) },
398  { "brainpool384r1", OID({1,3,36,3,3,2,8,1,1,11}) },
399  { "brainpool512r1", OID({1,3,36,3,3,2,8,1,1,13}) },
400  { "frp256v1", OID({1,2,250,1,223,101,256,1}) },
401  { "gost_256A", OID({1,2,643,2,2,35,1}) },
402  { "secp160k1", OID({1,3,132,0,9}) },
403  { "secp160r1", OID({1,3,132,0,8}) },
404  { "secp160r2", OID({1,3,132,0,30}) },
405  { "secp192k1", OID({1,3,132,0,31}) },
406  { "secp192r1", OID({1,2,840,10045,3,1,1}) },
407  { "secp224k1", OID({1,3,132,0,32}) },
408  { "secp224r1", OID({1,3,132,0,33}) },
409  { "secp256k1", OID({1,3,132,0,10}) },
410  { "secp256r1", OID({1,2,840,10045,3,1,7}) },
411  { "secp384r1", OID({1,3,132,0,34}) },
412  { "secp521r1", OID({1,3,132,0,35}) },
413  { "sm2p256v1", OID({1,2,156,10197,1,301}) },
414  { "x962_p192v2", OID({1,2,840,10045,3,1,2}) },
415  { "x962_p192v3", OID({1,2,840,10045,3,1,3}) },
416  { "x962_p239v1", OID({1,2,840,10045,3,1,4}) },
417  { "x962_p239v2", OID({1,2,840,10045,3,1,5}) },
418  { "x962_p239v3", OID({1,2,840,10045,3,1,6}) }
419  };
420  }

◆ lookup() [1/2]

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

◆ lookup() [2/2]

OID Botan::OIDS::lookup ( 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 118 of file oids.cpp.

119  {
120  return OID_Map::global_registry().lookup(name);
121  }

◆ name_of()

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

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 128 of file oids.cpp.

References lookup().

129  {
130  return (oid == lookup(name));
131  }
OID lookup(const std::string &name)
Definition: oids.cpp:118

◆ oid2str()

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

Definition at line 48 of file oids.h.

References lookup().

Referenced by Botan::X509_DN::contents(), and Botan::X509_Certificate::to_string().

49  {
50  return lookup(oid);
51  }
std::string lookup(const OID &oid)
Definition: oids.cpp:113

◆ str2oid()

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

Definition at line 53 of file oids.h.

References lookup().

Referenced by Botan::X509_Certificate::allowed_extended_usage(), Botan::X509_Certificate::has_ex_constraint(), and Botan::X509_Certificate::is_critical().

54  {
55  return lookup(name);
56  }
std::string lookup(const OID &oid)
Definition: oids.cpp:113