From 83d246bc7ff0a699a353c02348ca7d42261a02c9 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Tue, 10 Jul 2012 18:51:58 -0700 Subject: [PATCH] correctly interpret challtime and challtype as ints --- server-ca/daemon.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server-ca/daemon.py b/server-ca/daemon.py index 9b3b1507b..289a6c47d 100644 --- a/server-ca/daemon.py +++ b/server-ca/daemon.py @@ -112,13 +112,14 @@ def testchallenge(session): for i, name in enumerate(r.lrange("%s:names" % session, 0, -1)): challenge = "%s:%d" % (session, i) if debug: print "testing challenge", challenge - challtime = r.hget(challenge, "challtime") - challtype = r.hget(challenge, "type") + challtime = int(r.hget(challenge, "challtime")) + challtype = int(r.hget(challenge, "type")) name = r.hget(challenge, "name") satisfied = r.hget(challenge, "satisfied") == "True" failed = r.hget(challenge, "failed") == "True" # TODO: check whether this challenge is too old if not satisfied and not failed: + if debug: print "challenge", challenge, "is not satisfied and not failed" if challtype == 0: # DomainValidateSNI if debug: print "\tbeginning dvsni test" dvsni_nonce = r.hget(challenge, "dvsni:nonce") @@ -139,6 +140,7 @@ def testchallenge(session): # Don't know how to handle this challenge type all_satisfied = False elif not satisfied: + if debug: print "\tchallenge was not attempted" all_satisfied = False if all_satisfied: # Challenges all succeeded, so we should prepare to issue