diff options
author | Rob Austein <sra@hactrn.net> | 2007-10-05 15:35:19 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-10-05 15:35:19 +0000 |
commit | 20c920933600148bec4d78f26ea0fd41b4dc53b7 (patch) | |
tree | aad5d8babadc868ec20f794d6818ce2f307d280e /scripts/rpki/up_down.py | |
parent | 91e72bf2592a0c71cb4f9099df1c9a0420bc11cc (diff) |
Revoke request
svn path=/scripts/rpki/up_down.py; revision=1098
Diffstat (limited to 'scripts/rpki/up_down.py')
-rw-r--r-- | scripts/rpki/up_down.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/rpki/up_down.py b/scripts/rpki/up_down.py index 1fd28d5f..149de9c8 100644 --- a/scripts/rpki/up_down.py +++ b/scripts/rpki/up_down.py @@ -295,8 +295,11 @@ class issue_pdu(base_elt): @classmethod def query(cls, gctx, ca, sia): - """Send an "issue" request to associated with ca.""" + """Send an "issue" request to parent associated with ca.""" parent = rpki.left_right.parent_elt.sql_fetch(gctx.db, gctx.cur, ca.parent_id) + # + # Do we always want the active ca_detail here? Assume yes for + # now, may need to revisit ca_detail = rpki.sql.ca_detail_obj.sql_fetch_active(gctx.db, gctx.cur, ca.ca_id) if ca_detail is None: ca_detail = rpki.sql.ca_detail_obj.create(gctx, ca) @@ -342,6 +345,16 @@ class revoke_pdu(revoke_syntax): r_msg.payload.class_name = self.class_name r_msg.payload.ski = self.ski + @classmethod + def query(cls, gctx, ca_detail): + """Send a "revoke" request to parent associated with ca_detail.""" + ca = rpki.sql.ca_obj.sql_fetch(gctx.db, gctx.cur, ca_detail.ca_id) + parent = rpki.left_right.parent_elt.sql_fetch(gctx.db, gctx.cur, ca.parent_id) + self = cls() + self.class_name = ca.parent_resource_class + self.ski = ca_detail.latest_ca_cert.gSKI() + return parent.query_up_down(gctx, self) + class revoke_response_pdu(revoke_syntax): """Up-Down protocol "revoke_response" PDU.""" |