aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-10-22 00:51:13 -0400
committerJack Lloyd <[email protected]>2016-11-03 11:56:50 -0400
commit62e55f484a7a03e2532875696eb2479a577878e9 (patch)
tree71c86436d9c3dd2059f7d0024f204e66e535b2b2 /src/lib/x509
parentb1021ca76bb3c47b1b520421ccece38d772e5907 (diff)
Remove ability to add OIDS at runtime. Remove global OID lock.
OID map is now generated from an input file on an as needed basis. Just uses a sequence of ifs - simple, fast, and small code size. Merges oid_lookup sub-module which was already required by asn1 anyway, so completely non-optional. Removes @neusdan's nice OID tests since without any runtime adds the tests are moot.
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/x509_ext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index 23340f784..c22e9ebcb 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -25,8 +25,7 @@ namespace Botan {
Certificate_Extension* Extensions::get_extension(const OID& oid, bool critical)
{
#define X509_EXTENSION(NAME, TYPE) \
- if(OIDS::name_of(oid, NAME)) \
- return new Cert_Extension::TYPE();
+ if(oid == OIDS::lookup(NAME)) { return new Cert_Extension::TYPE(); }
X509_EXTENSION("X509v3.KeyUsage", Key_Usage);
X509_EXTENSION("X509v3.BasicConstraints", Basic_Constraints);