diff options
-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): |