diff options
author | Michael Elkins <melkins@tislabs.com> | 2011-06-14 13:17:13 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2011-06-14 13:17:13 +0000 |
commit | e27d6bd7ef9b4625bdd0c5f8762ab16ee0801a27 (patch) | |
tree | 526b771de634d77c3838e557a51162a86a6e1461 | |
parent | 59a7578a46ea66572027ac32d66ce60d3d204bd8 (diff) |
do not fail if AIA extension is missing since None is a valid return value
svn path=/rpkid/rpki/x509.py; revision=3869
-rw-r--r-- | rpkid/rpki/x509.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py index 9444ae53..dba4de30 100644 --- a/rpkid/rpki/x509.py +++ b/rpkid/rpki/x509.py @@ -113,9 +113,11 @@ def _find_xia_uri(extension, name): """ oid = rpki.oids.name2oid[name] - for method, location in extension: - if method == oid and location[0] == "uri" and location[1].startswith("rsync://"): - return location[1] + # extension may be None if the AIA is not present + if extension: + for method, location in extension: + if method == oid and location[0] == "uri" and location[1].startswith("rsync://"): + return location[1] return None class DER_object(object): |