From e0feffc3625e1857b070ada86202c0486238a038 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 28 Sep 2007 23:43:26 +0000 Subject: Checkpoint svn path=/scripts/rpki/up_down.py; revision=1050 --- scripts/rpki/up_down.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts/rpki/up_down.py') 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 -- cgit v1.2.3