mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
correctly interpret challtime and challtype as ints
This commit is contained in:
+4
-2
@@ -112,13 +112,14 @@ def testchallenge(session):
|
|||||||
for i, name in enumerate(r.lrange("%s:names" % session, 0, -1)):
|
for i, name in enumerate(r.lrange("%s:names" % session, 0, -1)):
|
||||||
challenge = "%s:%d" % (session, i)
|
challenge = "%s:%d" % (session, i)
|
||||||
if debug: print "testing challenge", challenge
|
if debug: print "testing challenge", challenge
|
||||||
challtime = r.hget(challenge, "challtime")
|
challtime = int(r.hget(challenge, "challtime"))
|
||||||
challtype = r.hget(challenge, "type")
|
challtype = int(r.hget(challenge, "type"))
|
||||||
name = r.hget(challenge, "name")
|
name = r.hget(challenge, "name")
|
||||||
satisfied = r.hget(challenge, "satisfied") == "True"
|
satisfied = r.hget(challenge, "satisfied") == "True"
|
||||||
failed = r.hget(challenge, "failed") == "True"
|
failed = r.hget(challenge, "failed") == "True"
|
||||||
# TODO: check whether this challenge is too old
|
# TODO: check whether this challenge is too old
|
||||||
if not satisfied and not failed:
|
if not satisfied and not failed:
|
||||||
|
if debug: print "challenge", challenge, "is not satisfied and not failed"
|
||||||
if challtype == 0: # DomainValidateSNI
|
if challtype == 0: # DomainValidateSNI
|
||||||
if debug: print "\tbeginning dvsni test"
|
if debug: print "\tbeginning dvsni test"
|
||||||
dvsni_nonce = r.hget(challenge, "dvsni:nonce")
|
dvsni_nonce = r.hget(challenge, "dvsni:nonce")
|
||||||
@@ -139,6 +140,7 @@ def testchallenge(session):
|
|||||||
# Don't know how to handle this challenge type
|
# Don't know how to handle this challenge type
|
||||||
all_satisfied = False
|
all_satisfied = False
|
||||||
elif not satisfied:
|
elif not satisfied:
|
||||||
|
if debug: print "\tchallenge was not attempted"
|
||||||
all_satisfied = False
|
all_satisfied = False
|
||||||
if all_satisfied:
|
if all_satisfied:
|
||||||
# Challenges all succeeded, so we should prepare to issue
|
# Challenges all succeeded, so we should prepare to issue
|
||||||
|
|||||||
Reference in New Issue
Block a user