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

Functions

bool have_oid (const std::string &oid)
 
std::string lookup (const OID &oid)
 
OID lookup (const std::string &name)
 
std::string oid2str (const OID &oid)
 
OID str2oid (const std::string &name)
 

Function Documentation

◆ have_oid()

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

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 47 of file oids.h.

References lookup().

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

48  {
49  return (lookup(oid).empty() == false);
50  }
std::string lookup(const OID &oid)
Definition: oids.cpp:18

◆ lookup() [1/2]

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

Resolve an OID

Parameters
oidthe OID to look up
Returns
name associated with this OID

Definition at line 18 of file oids.cpp.

References Botan::OID::as_string().

Referenced by Botan::X509_DN::add_attribute(), Botan::X509_Cert_Options::add_ex_constraint(), Botan::PKIX::check_chain(), Botan::PKIX::check_crl(), Botan::EMSA1::config_for_x509(), Botan::PSSR::config_for_x509(), Botan::EMSA_PKCS1v15::config_for_x509(), Botan::PKCS10_Request::constraints(), Botan::AlternativeName::contents(), Botan::EC_Group::EC_Group(), Botan::PKCS10_Request::ex_constraints(), Botan::X509_DN::get_attribute(), Botan::X509_DN::get_first_attribute(), Botan::Public_Key::get_oid(), Botan::X509_DN::has_field(), Botan::X509_Object::hash_used_for_signature(), have_oid(), Botan::PKCS10_Request::is_CA(), Botan::OCSP::CertID::is_id_for(), Botan::load_private_key(), Botan::load_public_key(), oid2str(), Botan::operator<(), Botan::PKCS10_Request::path_limit(), Botan::pbes2_decrypt(), Botan::PKCS8::PEM_encode_encrypted_pbkdf_msec(), Botan::PKCS10_Request::PKCS10_Request(), Botan::ASN1_Formatter::print_to_stream(), str2oid(), Botan::TLS::Callbacks::tls_ecdh_agree(), Botan::Cert_Extension::Certificate_Policies::validate(), Botan::X509_Object::verify_signature(), Botan::OCSP::Response::verify_signature(), Botan::X509_CA::X509_CA(), Botan::X509_DN::X509_DN(), and Botan::X942_PRF::X942_PRF().

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

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

228  {
229  if(name == "AES-128/CBC") return OID("2.16.840.1.101.3.4.1.2");
230  if(name == "AES-128/CCM") return OID("2.16.840.1.101.3.4.1.7");
231  if(name == "AES-128/GCM") return OID("2.16.840.1.101.3.4.1.6");
232  if(name == "AES-128/OCB") return OID("1.3.6.1.4.1.25258.3.2.1");
233  if(name == "AES-192/CBC") return OID("2.16.840.1.101.3.4.1.22");
234  if(name == "AES-192/CCM") return OID("2.16.840.1.101.3.4.1.27");
235  if(name == "AES-192/GCM") return OID("2.16.840.1.101.3.4.1.26");
236  if(name == "AES-192/OCB") return OID("1.3.6.1.4.1.25258.3.2.2");
237  if(name == "AES-256/CBC") return OID("2.16.840.1.101.3.4.1.42");
238  if(name == "AES-256/CCM") return OID("2.16.840.1.101.3.4.1.47");
239  if(name == "AES-256/GCM") return OID("2.16.840.1.101.3.4.1.46");
240  if(name == "AES-256/OCB") return OID("1.3.6.1.4.1.25258.3.2.3");
241  if(name == "CAST-128/CBC") return OID("1.2.840.113533.7.66.10");
242  if(name == "Compression.Zlib") return OID("1.2.840.113549.1.9.16.3.8");
243  if(name == "Curve25519") return OID("1.3.101.110");
244  if(name == "DES/CBC") return OID("1.3.14.3.2.7");
245  if(name == "DH") return OID("1.2.840.10046.2.1");
246  if(name == "DSA") return OID("1.2.840.10040.4.1");
247  if(name == "DSA/EMSA1(SHA-160)") return OID("1.2.840.10040.4.3");
248  if(name == "DSA/EMSA1(SHA-224)") return OID("2.16.840.1.101.3.4.3.1");
249  if(name == "DSA/EMSA1(SHA-256)") return OID("2.16.840.1.101.3.4.3.2");
250  if(name == "DSA/EMSA1(SHA-3(224))") return OID("2.16.840.1.101.3.4.3.5");
251  if(name == "DSA/EMSA1(SHA-3(256))") return OID("2.16.840.1.101.3.4.3.6");
252  if(name == "DSA/EMSA1(SHA-3(384))") return OID("2.16.840.1.101.3.4.3.7");
253  if(name == "DSA/EMSA1(SHA-3(512))") return OID("2.16.840.1.101.3.4.3.8");
254  if(name == "DSA/EMSA1(SHA-384)") return OID("2.16.840.1.101.3.4.3.3");
255  if(name == "DSA/EMSA1(SHA-512)") return OID("2.16.840.1.101.3.4.3.4");
256  if(name == "ECDH") return OID("1.3.132.1.12");
257  if(name == "ECDSA") return OID("1.2.840.10045.2.1");
258  if(name == "ECDSA/EMSA1(SHA-160)") return OID("1.2.840.10045.4.1");
259  if(name == "ECDSA/EMSA1(SHA-224)") return OID("1.2.840.10045.4.3.1");
260  if(name == "ECDSA/EMSA1(SHA-256)") return OID("1.2.840.10045.4.3.2");
261  if(name == "ECDSA/EMSA1(SHA-3(224))") return OID("2.16.840.1.101.3.4.3.9");
262  if(name == "ECDSA/EMSA1(SHA-3(256))") return OID("2.16.840.1.101.3.4.3.10");
263  if(name == "ECDSA/EMSA1(SHA-3(384))") return OID("2.16.840.1.101.3.4.3.11");
264  if(name == "ECDSA/EMSA1(SHA-3(512))") return OID("2.16.840.1.101.3.4.3.12");
265  if(name == "ECDSA/EMSA1(SHA-384)") return OID("1.2.840.10045.4.3.3");
266  if(name == "ECDSA/EMSA1(SHA-512)") return OID("1.2.840.10045.4.3.4");
267  if(name == "ECGDSA") return OID("1.3.36.3.3.2.5.2.1");
268  if(name == "ECGDSA/EMSA1(RIPEMD-160)") return OID("1.3.36.3.3.2.5.4.1");
269  if(name == "ECGDSA/EMSA1(SHA-160)") return OID("1.3.36.3.3.2.5.4.2");
270  if(name == "ECGDSA/EMSA1(SHA-224)") return OID("1.3.36.3.3.2.5.4.3");
271  if(name == "ECGDSA/EMSA1(SHA-256)") return OID("1.3.36.3.3.2.5.4.4");
272  if(name == "ECGDSA/EMSA1(SHA-384)") return OID("1.3.36.3.3.2.5.4.5");
273  if(name == "ECGDSA/EMSA1(SHA-512)") return OID("1.3.36.3.3.2.5.4.6");
274  if(name == "ECKCDSA") return OID("1.0.14888.3.0.5");
275  if(name == "ECKCDSA/EMSA1(SHA-1)") return OID("1.2.410.200004.1.100.4.3");
276  if(name == "ECKCDSA/EMSA1(SHA-224)") return OID("1.2.410.200004.1.100.4.4");
277  if(name == "ECKCDSA/EMSA1(SHA-256)") return OID("1.2.410.200004.1.100.4.5");
278  if(name == "Ed25519") return OID("1.3.101.112");
279  if(name == "ElGamal") return OID("1.3.6.1.4.1.3029.1.2.1");
280  if(name == "GOST-34.10") return OID("1.2.643.2.2.19");
281  if(name == "GOST-34.10/EMSA1(GOST-R-34.11-94)") return OID("1.2.643.2.2.3");
282  if(name == "GOST-34.10/EMSA1(SHA-256)") return OID("1.3.6.1.4.1.25258.1.6.1");
283  if(name == "HMAC(SHA-160)") return OID("1.2.840.113549.2.7");
284  if(name == "HMAC(SHA-224)") return OID("1.2.840.113549.2.8");
285  if(name == "HMAC(SHA-256)") return OID("1.2.840.113549.2.9");
286  if(name == "HMAC(SHA-384)") return OID("1.2.840.113549.2.10");
287  if(name == "HMAC(SHA-512)") return OID("1.2.840.113549.2.11");
288  if(name == "KeyWrap.AES-128") return OID("2.16.840.1.101.3.4.1.5");
289  if(name == "KeyWrap.AES-192") return OID("2.16.840.1.101.3.4.1.25");
290  if(name == "KeyWrap.AES-256") return OID("2.16.840.1.101.3.4.1.45");
291  if(name == "KeyWrap.CAST-128") return OID("1.2.840.113533.7.66.15");
292  if(name == "KeyWrap.RC2") return OID("1.2.840.113549.1.9.16.3.7");
293  if(name == "KeyWrap.TripleDES") return OID("1.2.840.113549.1.9.16.3.6");
294  if(name == "MD5") return OID("1.2.840.113549.2.5");
295  if(name == "MGF1") return OID("1.2.840.113549.1.1.8");
296  if(name == "McEliece") return OID("1.3.6.1.4.1.25258.1.3");
297  if(name == "Microsoft SmartcardLogon") return OID("1.3.6.1.4.1.311.20.2.2");
298  if(name == "PBE-PKCS5v20") return OID("1.2.840.113549.1.5.13");
299  if(name == "PKCS5.PBKDF2") return OID("1.2.840.113549.1.5.12");
300  if(name == "PKCS9.ChallengePassword") return OID("1.2.840.113549.1.9.7");
301  if(name == "PKCS9.ContentType") return OID("1.2.840.113549.1.9.3");
302  if(name == "PKCS9.EmailAddress") return OID("1.2.840.113549.1.9.1");
303  if(name == "PKCS9.ExtensionRequest") return OID("1.2.840.113549.1.9.14");
304  if(name == "PKCS9.MessageDigest") return OID("1.2.840.113549.1.9.4");
305  if(name == "PKCS9.UnstructuredName") return OID("1.2.840.113549.1.9.2");
306  if(name == "PKIX.AuthorityInformationAccess") return OID("1.3.6.1.5.5.7.1.1");
307  if(name == "PKIX.CertificateAuthorityIssuers") return OID("1.3.6.1.5.5.7.48.2");
308  if(name == "PKIX.ClientAuth") return OID("1.3.6.1.5.5.7.3.2");
309  if(name == "PKIX.CodeSigning") return OID("1.3.6.1.5.5.7.3.3");
310  if(name == "PKIX.EmailProtection") return OID("1.3.6.1.5.5.7.3.4");
311  if(name == "PKIX.IPsecEndSystem") return OID("1.3.6.1.5.5.7.3.5");
312  if(name == "PKIX.IPsecTunnel") return OID("1.3.6.1.5.5.7.3.6");
313  if(name == "PKIX.IPsecUser") return OID("1.3.6.1.5.5.7.3.7");
314  if(name == "PKIX.OCSP") return OID("1.3.6.1.5.5.7.48.1");
315  if(name == "PKIX.OCSP.BasicResponse") return OID("1.3.6.1.5.5.7.48.1.1");
316  if(name == "PKIX.OCSPSigning") return OID("1.3.6.1.5.5.7.3.9");
317  if(name == "PKIX.ServerAuth") return OID("1.3.6.1.5.5.7.3.1");
318  if(name == "PKIX.TimeStamping") return OID("1.3.6.1.5.5.7.3.8");
319  if(name == "PKIX.XMPPAddr") return OID("1.3.6.1.5.5.7.8.5");
320  if(name == "RC2/CBC") return OID("1.2.840.113549.3.2");
321  if(name == "RIPEMD-160") return OID("1.3.36.3.2.1");
322  if(name == "RSA") return OID("1.2.840.113549.1.1.1");
323  if(name == "RSA/EMSA3(MD5)") return OID("1.2.840.113549.1.1.4");
324  if(name == "RSA/EMSA3(RIPEMD-160)") return OID("1.3.36.3.3.1.2");
325  if(name == "RSA/EMSA3(SHA-160)") return OID("1.2.840.113549.1.1.5");
326  if(name == "RSA/EMSA3(SHA-224)") return OID("1.2.840.113549.1.1.14");
327  if(name == "RSA/EMSA3(SHA-256)") return OID("1.2.840.113549.1.1.11");
328  if(name == "RSA/EMSA3(SHA-3(224))") return OID("2.16.840.1.101.3.4.3.13");
329  if(name == "RSA/EMSA3(SHA-3(256))") return OID("2.16.840.1.101.3.4.3.14");
330  if(name == "RSA/EMSA3(SHA-3(384))") return OID("2.16.840.1.101.3.4.3.15");
331  if(name == "RSA/EMSA3(SHA-3(512))") return OID("2.16.840.1.101.3.4.3.16");
332  if(name == "RSA/EMSA3(SHA-384)") return OID("1.2.840.113549.1.1.12");
333  if(name == "RSA/EMSA3(SHA-512)") return OID("1.2.840.113549.1.1.13");
334  if(name == "RSA/EMSA3(SHA-512-256)") return OID("1.2.840.113549.1.1.16");
335  if(name == "RSA/EMSA3(SM3)") return OID("1.2.156.10197.1.504");
336  if(name == "RSA/EMSA4") return OID("1.2.840.113549.1.1.10");
337  if(name == "RSA/OAEP") return OID("1.2.840.113549.1.1.7");
338  if(name == "SEED/CBC") return OID("1.2.410.200004.1.4");
339  if(name == "SHA-160") return OID("1.3.14.3.2.26");
340  if(name == "SHA-224") return OID("2.16.840.1.101.3.4.2.4");
341  if(name == "SHA-256") return OID("2.16.840.1.101.3.4.2.1");
342  if(name == "SHA-3(224)") return OID("2.16.840.1.101.3.4.2.7");
343  if(name == "SHA-3(256)") return OID("2.16.840.1.101.3.4.2.8");
344  if(name == "SHA-3(384)") return OID("2.16.840.1.101.3.4.2.9");
345  if(name == "SHA-3(512)") return OID("2.16.840.1.101.3.4.2.10");
346  if(name == "SHA-384") return OID("2.16.840.1.101.3.4.2.2");
347  if(name == "SHA-512") return OID("2.16.840.1.101.3.4.2.3");
348  if(name == "SHA-512-256") return OID("2.16.840.1.101.3.4.2.6");
349  if(name == "SHAKE-128") return OID("2.16.840.1.101.3.4.2.11");
350  if(name == "SHAKE-256") return OID("2.16.840.1.101.3.4.2.12");
351  if(name == "SM2_Enc") return OID("1.2.156.10197.1.301.3");
352  if(name == "SM2_Kex") return OID("1.2.156.10197.1.301.2");
353  if(name == "SM2_Sig") return OID("1.2.156.10197.1.301.1");
354  if(name == "SM3") return OID("1.2.156.10197.1.401");
355  if(name == "Serpent/CBC") return OID("1.3.6.1.4.1.25258.3.1");
356  if(name == "Serpent/GCM") return OID("1.3.6.1.4.1.25258.3.101");
357  if(name == "Serpent/OCB") return OID("1.3.6.1.4.1.25258.3.2.4");
358  if(name == "Streebog-256") return OID("1.2.643.7.1.1.2.2");
359  if(name == "Streebog-512") return OID("1.2.643.7.1.1.2.3");
360  if(name == "Threefish-512/CBC") return OID("1.3.6.1.4.1.25258.3.2");
361  if(name == "Tiger(24,3)") return OID("1.3.6.1.4.1.11591.12.2");
362  if(name == "TripleDES/CBC") return OID("1.2.840.113549.3.7");
363  if(name == "Twofish/CBC") return OID("1.3.6.1.4.1.25258.3.3");
364  if(name == "Twofish/GCM") return OID("1.3.6.1.4.1.25258.3.102");
365  if(name == "Twofish/OCB") return OID("1.3.6.1.4.1.25258.3.2.5");
366  if(name == "X509v3.AnyPolicy") return OID("2.5.29.32.0");
367  if(name == "X509v3.AuthorityKeyIdentifier") return OID("2.5.29.35");
368  if(name == "X509v3.BasicConstraints") return OID("2.5.29.19");
369  if(name == "X509v3.CRLDistributionPoints") return OID("2.5.29.31");
370  if(name == "X509v3.CRLIssuingDistributionPoint") return OID("2.5.29.28");
371  if(name == "X509v3.CRLNumber") return OID("2.5.29.20");
372  if(name == "X509v3.CertificatePolicies") return OID("2.5.29.32");
373  if(name == "X509v3.ExtendedKeyUsage") return OID("2.5.29.37");
374  if(name == "X509v3.HoldInstructionCode") return OID("2.5.29.23");
375  if(name == "X509v3.InvalidityDate") return OID("2.5.29.24");
376  if(name == "X509v3.IssuerAlternativeName") return OID("2.5.29.18");
377  if(name == "X509v3.KeyUsage") return OID("2.5.29.15");
378  if(name == "X509v3.NameConstraints") return OID("2.5.29.30");
379  if(name == "X509v3.PolicyConstraints") return OID("2.5.29.36");
380  if(name == "X509v3.ReasonCode") return OID("2.5.29.21");
381  if(name == "X509v3.SubjectAlternativeName") return OID("2.5.29.17");
382  if(name == "X509v3.SubjectKeyIdentifier") return OID("2.5.29.14");
383  if(name == "X520.CommonName") return OID("2.5.4.3");
384  if(name == "X520.Country") return OID("2.5.4.6");
385  if(name == "X520.DNQualifier") return OID("2.5.4.46");
386  if(name == "X520.GenerationalQualifier") return OID("2.5.4.44");
387  if(name == "X520.GivenName") return OID("2.5.4.42");
388  if(name == "X520.Initials") return OID("2.5.4.43");
389  if(name == "X520.Locality") return OID("2.5.4.7");
390  if(name == "X520.Organization") return OID("2.5.4.10");
391  if(name == "X520.OrganizationalUnit") return OID("2.5.4.11");
392  if(name == "X520.Pseudonym") return OID("2.5.4.65");
393  if(name == "X520.SerialNumber") return OID("2.5.4.5");
394  if(name == "X520.State") return OID("2.5.4.8");
395  if(name == "X520.Surname") return OID("2.5.4.4");
396  if(name == "X520.Title") return OID("2.5.4.12");
397  if(name == "XMSS") return OID("1.3.6.1.4.1.25258.1.5");
398  if(name == "brainpool160r1") return OID("1.3.36.3.3.2.8.1.1.1");
399  if(name == "brainpool192r1") return OID("1.3.36.3.3.2.8.1.1.3");
400  if(name == "brainpool224r1") return OID("1.3.36.3.3.2.8.1.1.5");
401  if(name == "brainpool256r1") return OID("1.3.36.3.3.2.8.1.1.7");
402  if(name == "brainpool320r1") return OID("1.3.36.3.3.2.8.1.1.9");
403  if(name == "brainpool384r1") return OID("1.3.36.3.3.2.8.1.1.11");
404  if(name == "brainpool512r1") return OID("1.3.36.3.3.2.8.1.1.13");
405  if(name == "frp256v1") return OID("1.2.250.1.223.101.256.1");
406  if(name == "gost_256A") return OID("1.2.643.2.2.35.1");
407  if(name == "secp160k1") return OID("1.3.132.0.9");
408  if(name == "secp160r1") return OID("1.3.132.0.8");
409  if(name == "secp160r2") return OID("1.3.132.0.30");
410  if(name == "secp192k1") return OID("1.3.132.0.31");
411  if(name == "secp192r1") return OID("1.2.840.10045.3.1.1");
412  if(name == "secp224k1") return OID("1.3.132.0.32");
413  if(name == "secp224r1") return OID("1.3.132.0.33");
414  if(name == "secp256k1") return OID("1.3.132.0.10");
415  if(name == "secp256r1") return OID("1.2.840.10045.3.1.7");
416  if(name == "secp384r1") return OID("1.3.132.0.34");
417  if(name == "secp521r1") return OID("1.3.132.0.35");
418  if(name == "sm2p256v1") return OID("1.2.156.10197.1.301");
419  if(name == "x962_p192v2") return OID("1.2.840.10045.3.1.2");
420  if(name == "x962_p192v3") return OID("1.2.840.10045.3.1.3");
421  if(name == "x962_p239v1") return OID("1.2.840.10045.3.1.4");
422  if(name == "x962_p239v2") return OID("1.2.840.10045.3.1.5");
423  if(name == "x962_p239v3") return OID("1.2.840.10045.3.1.6");
424 
425 #if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
426  if(name == BOTAN_HOUSE_ECC_CURVE_NAME) return OID(BOTAN_HOUSE_ECC_CURVE_OID);
427 #endif
428 
429  return OID();
430  }

◆ oid2str()

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

Definition at line 32 of file oids.h.

References lookup().

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

33  {
34  return lookup(oid);
35  }
std::string lookup(const OID &oid)
Definition: oids.cpp:18

◆ str2oid()

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

Definition at line 37 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().

38  {
39  return lookup(name);
40  }
std::string lookup(const OID &oid)
Definition: oids.cpp:18