aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-09-29 16:26:49 +0000
committerRob Austein <sra@hactrn.net>2012-09-29 16:26:49 +0000
commitea8ff95dfac7fea29aab3a0345074186e86e41ce (patch)
tree51de20f51df500ef42d450c94bbf8188e3ed66e5
parent95ac262067535e0dc3099813f76964f054877b99 (diff)
Convert BasicConstraints to use new POW method.
svn path=/branches/tk274/; revision=4740
-rw-r--r--rpkid/rpki/x509.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py
index d26c9037..1cd01dca 100644
--- a/rpkid/rpki/x509.py
+++ b/rpkid/rpki/x509.py
@@ -442,7 +442,7 @@ class DER_object(object):
Get the basicConstraints extension from this object. Only works
for subclasses that support getExtension().
"""
- return (self.get_POWpkix().getExtension(rpki.oids.name2oid["basicConstraints"]) or ((), 0, None))[2]
+ return self.get_POW().getBasicConstraints()
def is_CA(self):
"""
@@ -450,7 +450,7 @@ class DER_object(object):
extension and its cA value is true.
"""
basicConstraints = self.get_basicConstraints()
- return basicConstraints and basicConstraints[0] != 0
+ return basicConstraints is not None and basicConstraints[0]
def get_3779resources(self):
"""