Botan  2.8.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.

References name.

Referenced by add_oidstr().

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

◆ 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.

References name.

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

◆ 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(), and name.

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

◆ 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.

References name.

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

◆ 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.

References name.

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

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

◆ load_str2oid_map()

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

Definition at line 248 of file oid_maps.cpp.

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

◆ 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.

References name.

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

◆ 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(), and name.

129  {
130  return (oid == lookup(name));
131  }
std::string name
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(), and name.

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 name
std::string lookup(const OID &oid)
Definition: oids.cpp:113