aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-09-28 23:43:26 +0000
committerRob Austein <sra@hactrn.net>2007-09-28 23:43:26 +0000
commite0feffc3625e1857b070ada86202c0486238a038 (patch)
tree6f105272ec1444968b8be118dbb4be58896b76cb
parent22f5d94293e1189b7b2b3ca1e93acd3251159e24 (diff)
Checkpoint
svn path=/scripts/rpki/up_down.py; revision=1050
-rw-r--r--scripts/rpki/up_down.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/rpki/up_down.py b/scripts/rpki/up_down.py
index a809cc26..c1592183 100644
--- a/scripts/rpki/up_down.py
+++ b/scripts/rpki/up_down.py
@@ -254,10 +254,9 @@ class issue_pdu(base_elt):
raise rpki.exceptions.BadPKCS10, "basicConstraints extension must not specify Path Length"
if "keyUsage" in exts and (not exts["keyUsage"][5] or not exts["keyUsage"][6]):
raise rpki.exceptions.BadPKCS10, "keyUsage doesn't match basicConstraints"
- if "subjectInfoAccess" in exts:
- for method, location in exts["subjectInfoAccess"]:
- if oids.get(method) == "caRepository" and (location[0] != "uri" or (location[1].startswith("rsync://") and not location[1].endswith("/"))):
- raise rpki.exceptions.BadPKCS10, "Certificate request includes bad SIA component: %s" % location
+ for method, location in exts.get("subjectInfoAccess", ()):
+ if oids.get(method) == "caRepository" and (location[0] != "uri" or (location[1].startswith("rsync://") and not location[1].endswith("/"))):
+ raise rpki.exceptions.BadPKCS10, "Certificate request includes bad SIA component: %s" % location
assert "subjectInfoAccess" in exts, "Can't (yet) handle PKCS #10 without an SIA extension"
raise NotImplementedError