From 07c8719034f1d5086e733cb3f8461bf5c4ae934c Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 6 Nov 2007 23:53:01 +0000 Subject: Rework debugging svn path=/scripts/rpki/cms.py; revision=1253 --- scripts/rpki/cms.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts/rpki/cms.py') 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 -- cgit v1.2.3