From e27d6bd7ef9b4625bdd0c5f8762ab16ee0801a27 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Tue, 14 Jun 2011 13:17:13 +0000 Subject: do not fail if AIA extension is missing since None is a valid return value svn path=/rpkid/rpki/x509.py; revision=3869 --- rpkid/rpki/x509.py | 8 +++++--- 1 file 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): -- cgit v1.2.3