diff --git a/trustify/client/client.py b/trustify/client/client.py index e329304d9..782aac1f8 100644 --- a/trustify/client/client.py +++ b/trustify/client/client.py @@ -541,7 +541,7 @@ def authenticate(): # This should be invoked if a payment is necessary # This is being tested and will have to be cleaned and organized # once the protocol is finalized. - if r.challenge and all_payment_challenge(r): + while r.challenge and all_payment_challenge(r): # dont need to change domain names here paymentChallenges, temp = challenge_factory(r, os.path.abspath(req_file), os.path.abspath(key_file), config) for chall in paymentChallenges: @@ -556,7 +556,7 @@ def authenticate(): # Send the proceed message r = decode(do(upstream, k)) - while r.proceed.IsInitialized() or r.challenge: + while r.proceed.IsInitialized(): if r.proceed.IsInitialized(): delay = min(r.proceed.polldelay, 60) logger.debug("waiting %d" % delay)