Botan 3.0.0-alpha0
Crypto and TLS for C&
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)
 
std::unordered_map< std::string, std::string > load_oid2str_map ()
 
std::unordered_map< std::string, OIDload_str2oid_map ()
 
BOTAN_UNSTABLE_API std::string oid2str_or_empty (const OID &oid)
 
BOTAN_UNSTABLE_API std::string oid2str_or_throw (const OID &oid)
 
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 85 of file oids.cpp.

86 {
87 OID_Map::global_registry().add_oid(oid, name);
88 }
std::string name

References name.

Referenced by add_oidstr().

◆ add_oid2str()

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

Definition at line 95 of file oids.cpp.

96 {
97 OID_Map::global_registry().add_oid2str(oid, name);
98 }

References name.

◆ add_oidstr()

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

Definition at line 90 of file oids.cpp.

91 {
92 add_oid(OID(oidstr), name);
93 }
BOTAN_UNSTABLE_API void add_oid(const OID &oid, const std::string &name)
Definition: oids.cpp:85

References add_oid(), and name.

◆ add_str2oid()

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

Definition at line 100 of file oids.cpp.

101 {
102 OID_Map::global_registry().add_str2oid(oid, name);
103 }

References 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.15.1", "OpenPGP.Ed25519" },
140 { "1.3.6.1.4.1.11591.4.11", "Scrypt" },
141 { "1.3.6.1.4.1.2.267.10.2.2", "Kyber-512-90s-r3" },
142 { "1.3.6.1.4.1.2.267.10.3.3", "Kyber-768-90s-r3" },
143 { "1.3.6.1.4.1.2.267.10.4.4", "Kyber-1024-90s-r3" },
144 { "1.3.6.1.4.1.2.267.8.2.2", "Kyber-512-r3" },
145 { "1.3.6.1.4.1.2.267.8.3.3", "Kyber-768-r3" },
146 { "1.3.6.1.4.1.2.267.8.4.4", "Kyber-1024-r3" },
147 { "1.3.6.1.4.1.25258.1.3", "McEliece" },
148 { "1.3.6.1.4.1.25258.1.5", "XMSS-draft6" },
149 { "1.3.6.1.4.1.25258.1.6.1", "GOST-34.10-2012-256/EMSA1(SHA-256)" },
150 { "1.3.6.1.4.1.25258.1.8", "XMSS-draft12" },
151 { "1.3.6.1.4.1.25258.3.1", "Serpent/CBC" },
152 { "1.3.6.1.4.1.25258.3.101", "Serpent/GCM" },
153 { "1.3.6.1.4.1.25258.3.102", "Twofish/GCM" },
154 { "1.3.6.1.4.1.25258.3.2", "Threefish-512/CBC" },
155 { "1.3.6.1.4.1.25258.3.2.1", "AES-128/OCB" },
156 { "1.3.6.1.4.1.25258.3.2.2", "AES-192/OCB" },
157 { "1.3.6.1.4.1.25258.3.2.3", "AES-256/OCB" },
158 { "1.3.6.1.4.1.25258.3.2.4", "Serpent/OCB" },
159 { "1.3.6.1.4.1.25258.3.2.5", "Twofish/OCB" },
160 { "1.3.6.1.4.1.25258.3.2.6", "Camellia-128/OCB" },
161 { "1.3.6.1.4.1.25258.3.2.7", "Camellia-192/OCB" },
162 { "1.3.6.1.4.1.25258.3.2.8", "Camellia-256/OCB" },
163 { "1.3.6.1.4.1.25258.3.3", "Twofish/CBC" },
164 { "1.3.6.1.4.1.25258.3.4.1", "AES-128/SIV" },
165 { "1.3.6.1.4.1.25258.3.4.2", "AES-192/SIV" },
166 { "1.3.6.1.4.1.25258.3.4.3", "AES-256/SIV" },
167 { "1.3.6.1.4.1.25258.3.4.4", "Serpent/SIV" },
168 { "1.3.6.1.4.1.25258.3.4.5", "Twofish/SIV" },
169 { "1.3.6.1.4.1.25258.3.4.6", "Camellia-128/SIV" },
170 { "1.3.6.1.4.1.25258.3.4.7", "Camellia-192/SIV" },
171 { "1.3.6.1.4.1.25258.3.4.8", "Camellia-256/SIV" },
172 { "1.3.6.1.4.1.25258.3.4.9", "SM4/SIV" },
173 { "1.3.6.1.4.1.3029.1.2.1", "ElGamal" },
174 { "1.3.6.1.4.1.3029.1.5.1", "OpenPGP.Curve25519" },
175 { "1.3.6.1.4.1.311.20.2.2", "Microsoft SmartcardLogon" },
176 { "1.3.6.1.4.1.311.20.2.3", "Microsoft UPN" },
177 { "1.3.6.1.4.1.8301.3.1.2.9.0.38", "secp521r1" },
178 { "1.3.6.1.5.5.7.1.1", "PKIX.AuthorityInformationAccess" },
179 { "1.3.6.1.5.5.7.3.1", "PKIX.ServerAuth" },
180 { "1.3.6.1.5.5.7.3.2", "PKIX.ClientAuth" },
181 { "1.3.6.1.5.5.7.3.3", "PKIX.CodeSigning" },
182 { "1.3.6.1.5.5.7.3.4", "PKIX.EmailProtection" },
183 { "1.3.6.1.5.5.7.3.5", "PKIX.IPsecEndSystem" },
184 { "1.3.6.1.5.5.7.3.6", "PKIX.IPsecTunnel" },
185 { "1.3.6.1.5.5.7.3.7", "PKIX.IPsecUser" },
186 { "1.3.6.1.5.5.7.3.8", "PKIX.TimeStamping" },
187 { "1.3.6.1.5.5.7.3.9", "PKIX.OCSPSigning" },
188 { "1.3.6.1.5.5.7.48.1", "PKIX.OCSP" },
189 { "1.3.6.1.5.5.7.48.1.1", "PKIX.OCSP.BasicResponse" },
190 { "1.3.6.1.5.5.7.48.2", "PKIX.CertificateAuthorityIssuers" },
191 { "1.3.6.1.5.5.7.8.5", "PKIX.XMPPAddr" },
192 { "2.16.840.1.101.3.4.1.2", "AES-128/CBC" },
193 { "2.16.840.1.101.3.4.1.22", "AES-192/CBC" },
194 { "2.16.840.1.101.3.4.1.25", "KeyWrap.AES-192" },
195 { "2.16.840.1.101.3.4.1.26", "AES-192/GCM" },
196 { "2.16.840.1.101.3.4.1.27", "AES-192/CCM" },
197 { "2.16.840.1.101.3.4.1.42", "AES-256/CBC" },
198 { "2.16.840.1.101.3.4.1.45", "KeyWrap.AES-256" },
199 { "2.16.840.1.101.3.4.1.46", "AES-256/GCM" },
200 { "2.16.840.1.101.3.4.1.47", "AES-256/CCM" },
201 { "2.16.840.1.101.3.4.1.5", "KeyWrap.AES-128" },
202 { "2.16.840.1.101.3.4.1.6", "AES-128/GCM" },
203 { "2.16.840.1.101.3.4.1.7", "AES-128/CCM" },
204 { "2.16.840.1.101.3.4.2.1", "SHA-256" },
205 { "2.16.840.1.101.3.4.2.10", "SHA-3(512)" },
206 { "2.16.840.1.101.3.4.2.11", "SHAKE-128" },
207 { "2.16.840.1.101.3.4.2.12", "SHAKE-256" },
208 { "2.16.840.1.101.3.4.2.2", "SHA-384" },
209 { "2.16.840.1.101.3.4.2.3", "SHA-512" },
210 { "2.16.840.1.101.3.4.2.4", "SHA-224" },
211 { "2.16.840.1.101.3.4.2.6", "SHA-512-256" },
212 { "2.16.840.1.101.3.4.2.7", "SHA-3(224)" },
213 { "2.16.840.1.101.3.4.2.8", "SHA-3(256)" },
214 { "2.16.840.1.101.3.4.2.9", "SHA-3(384)" },
215 { "2.16.840.1.101.3.4.3.1", "DSA/EMSA1(SHA-224)" },
216 { "2.16.840.1.101.3.4.3.10", "ECDSA/EMSA1(SHA-3(256))" },
217 { "2.16.840.1.101.3.4.3.11", "ECDSA/EMSA1(SHA-3(384))" },
218 { "2.16.840.1.101.3.4.3.12", "ECDSA/EMSA1(SHA-3(512))" },
219 { "2.16.840.1.101.3.4.3.13", "RSA/EMSA3(SHA-3(224))" },
220 { "2.16.840.1.101.3.4.3.14", "RSA/EMSA3(SHA-3(256))" },
221 { "2.16.840.1.101.3.4.3.15", "RSA/EMSA3(SHA-3(384))" },
222 { "2.16.840.1.101.3.4.3.16", "RSA/EMSA3(SHA-3(512))" },
223 { "2.16.840.1.101.3.4.3.2", "DSA/EMSA1(SHA-256)" },
224 { "2.16.840.1.101.3.4.3.3", "DSA/EMSA1(SHA-384)" },
225 { "2.16.840.1.101.3.4.3.4", "DSA/EMSA1(SHA-512)" },
226 { "2.16.840.1.101.3.4.3.5", "DSA/EMSA1(SHA-3(224))" },
227 { "2.16.840.1.101.3.4.3.6", "DSA/EMSA1(SHA-3(256))" },
228 { "2.16.840.1.101.3.4.3.7", "DSA/EMSA1(SHA-3(384))" },
229 { "2.16.840.1.101.3.4.3.8", "DSA/EMSA1(SHA-3(512))" },
230 { "2.16.840.1.101.3.4.3.9", "ECDSA/EMSA1(SHA-3(224))" },
231 { "2.16.840.1.113730.1.13", "Certificate Comment" },
232 { "2.5.29.14", "X509v3.SubjectKeyIdentifier" },
233 { "2.5.29.15", "X509v3.KeyUsage" },
234 { "2.5.29.16", "X509v3.PrivateKeyUsagePeriod" },
235 { "2.5.29.17", "X509v3.SubjectAlternativeName" },
236 { "2.5.29.18", "X509v3.IssuerAlternativeName" },
237 { "2.5.29.19", "X509v3.BasicConstraints" },
238 { "2.5.29.20", "X509v3.CRLNumber" },
239 { "2.5.29.21", "X509v3.ReasonCode" },
240 { "2.5.29.23", "X509v3.HoldInstructionCode" },
241 { "2.5.29.24", "X509v3.InvalidityDate" },
242 { "2.5.29.28", "X509v3.CRLIssuingDistributionPoint" },
243 { "2.5.29.30", "X509v3.NameConstraints" },
244 { "2.5.29.31", "X509v3.CRLDistributionPoints" },
245 { "2.5.29.32", "X509v3.CertificatePolicies" },
246 { "2.5.29.32.0", "X509v3.AnyPolicy" },
247 { "2.5.29.35", "X509v3.AuthorityKeyIdentifier" },
248 { "2.5.29.36", "X509v3.PolicyConstraints" },
249 { "2.5.29.37", "X509v3.ExtendedKeyUsage" },
250 { "2.5.4.10", "X520.Organization" },
251 { "2.5.4.11", "X520.OrganizationalUnit" },
252 { "2.5.4.12", "X520.Title" },
253 { "2.5.4.3", "X520.CommonName" },
254 { "2.5.4.4", "X520.Surname" },
255 { "2.5.4.42", "X520.GivenName" },
256 { "2.5.4.43", "X520.Initials" },
257 { "2.5.4.44", "X520.GenerationalQualifier" },
258 { "2.5.4.46", "X520.DNQualifier" },
259 { "2.5.4.5", "X520.SerialNumber" },
260 { "2.5.4.6", "X520.Country" },
261 { "2.5.4.65", "X520.Pseudonym" },
262 { "2.5.4.7", "X520.Locality" },
263 { "2.5.4.8", "X520.State" },
264 { "2.5.4.9", "X520.StreetAddress" },
265 { "2.5.8.1.1", "RSA" }
266 };
267 }

◆ load_str2oid_map()

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

Definition at line 269 of file oid_maps.cpp.

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

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

106 {
107 return OID_Map::global_registry().oid2str(oid);
108 }

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

◆ oid2str_or_throw()

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

Definition at line 115 of file oids.cpp.

116 {
117 std::string s = OIDS::oid2str_or_empty(oid);
118 if(s.empty())
119 throw Lookup_Error("No name associated with OID " + oid.to_string());
120 return s;
121 }
std::string to_string() const
Definition: asn1_oid.cpp:97
BOTAN_UNSTABLE_API std::string oid2str_or_empty(const OID &oid)
Definition: oids.cpp:105

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

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

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

111 {
112 return OID_Map::global_registry().str2oid(name);
113 }

References name.

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