diff options
author | Rob Austein <sra@hactrn.net> | 2007-11-06 23:53:01 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-11-06 23:53:01 +0000 |
commit | 07c8719034f1d5086e733cb3f8461bf5c4ae934c (patch) | |
tree | acf5bfa9dd3a0cdef69043f7e2d8ad52b7cbf0ae /scripts/rpki/cms.py | |
parent | 07cedcfb3ea69510b564c071c82da6707b12da36 (diff) |
Rework debugging
svn path=/scripts/rpki/cms.py; revision=1253
Diffstat (limited to 'scripts/rpki/cms.py')
-rw-r--r-- | scripts/rpki/cms.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/rpki/cms.py b/scripts/rpki/cms.py index 0f80b58d..1b150551 100644 --- a/scripts/rpki/cms.py +++ b/scripts/rpki/cms.py @@ -63,9 +63,6 @@ def verify(cms, ta): anything other than successful verification, we raise an exception. """ - if debug: - dumpasn1(cms) - ta_filename = "cms.tmp.ta.pem" f = open(ta_filename, "w") @@ -85,6 +82,14 @@ def verify(cms, ta): if status == "Verification successful\n": return plaintext else: + if debug: + print "CMS verification failed, dumping inputs:" + print + print "TA:" + dumpasn1(ta.get_DER()) + print + print "CMS:" + dumpasn1(cms) raise rpki.exceptions.CMSVerificationFailed, "CMS verification failed with status %s" % status |