diff options
author | Rob Austein <sra@hactrn.net> | 2007-12-05 05:17:55 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-12-05 05:17:55 +0000 |
commit | ce469b65294321b9cef0c1734d946b5a1a537f07 (patch) | |
tree | e9e08210c93389a533b5ee34dea03e2cb87c63bc /scripts/rpkid.py | |
parent | cfe926c349a510f12a9f84a8aa62f3428636eb9f (diff) |
Checkpoint
svn path=/scripts/apnic-poke-1.sh; revision=1364
Diffstat (limited to 'scripts/rpkid.py')
-rwxr-xr-x | scripts/rpkid.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/rpkid.py b/scripts/rpkid.py index feed9add..d12fc5bf 100755 --- a/scripts/rpkid.py +++ b/scripts/rpkid.py @@ -8,7 +8,7 @@ Usage: python rpkid.py [ { -c | --config } configfile ] [ { -h | --help } ] Default configuration file is rpkid.conf, override with --config option. """ -import traceback, os, time, getopt, sys, MySQLdb +import traceback, os, time, getopt, sys, MySQLdb, lxml.etree import rpki.resource_set, rpki.up_down, rpki.left_right, rpki.x509 import rpki.https, rpki.config, rpki.cms, rpki.exceptions, rpki.relaxng @@ -23,6 +23,11 @@ def left_right_handler(query, path): rpki.relaxng.left_right.assertValid(r_elt) reply = rpki.cms.xml_sign(r_elt, gctx.cms_key, gctx.cms_certs) return 200, reply + except lxml.etree.DocumentInvalid: + print "Received reply document does not pass schema check:" + print lxml.etree.tostring(r_elt, pretty_print = True) + traceback.print_exc() + return 500, "Schema violation" except Exception, data: traceback.print_exc() return 500, "Unhandled exception %s" % data |