diff options
author | Rob Austein <sra@hactrn.net> | 2009-04-26 23:22:04 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2009-04-26 23:22:04 +0000 |
commit | b7f3aa938ce6dffde5322110094123e48a92c288 (patch) | |
tree | 6703eeab46adc1dece48ef5551e986859d2a26cf | |
parent | 3f8208f49401d3f8178bdb13fdc3a1febb290696 (diff) |
Make event-driven
svn path=/rpkid/testpoke.py; revision=2358
-rw-r--r-- | rpkid/testpoke.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rpkid/testpoke.py b/rpkid/testpoke.py index f50d4ecf..a545e5bc 100644 --- a/rpkid/testpoke.py +++ b/rpkid/testpoke.py @@ -96,15 +96,19 @@ def query_up_down(q_pdu): sender = yaml_data["sender-id"], recipient = yaml_data["recipient-id"]) q_cms = rpki.up_down.cms_msg.wrap(q_msg, cms_key, cms_certs, cms_crl) - der = rpki.https.client( + + def done(der): + r_msg, r_xml = rpki.up_down.cms_msg.unwrap(der, [cms_ta] + cms_ca_certs, pretty_print = True) + print r_xml + r_msg.payload.check_response() + + rpki.https.client( server_ta = [https_ta] + https_ca_certs, client_key = https_key, client_cert = https_certs, msg = q_cms, - url = yaml_data["posturl"]) - r_msg, r_xml = rpki.up_down.cms_msg.unwrap(der, [cms_ta] + cms_ca_certs, pretty_print = True) - print r_xml - r_msg.payload.check_response() + url = yaml_data["posturl"], + callback = done) def do_list(): query_up_down(rpki.up_down.list_pdu()) |