aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509/x509_ext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/x509/x509_ext.cpp')
-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);