mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
in demo, only do POP challenge if the challenge type is POP challenge
This commit is contained in:
parent
1c5e4e2698
commit
f35fb42096
1 changed files with 8 additions and 6 deletions
|
|
@ -12,13 +12,15 @@ skid, snonce = make_challenge(open("/tmp/pub.pem"))
|
|||
m.challenge.add(name="what-is-the-frequency", type=m.ProofOfPossession, data=(skid, snonce))
|
||||
|
||||
for challenge in m.challenge:
|
||||
pcr = POPChallengeResponder(*challenge.data)
|
||||
pcr.find_priv(["/tmp/pub.pem", "/tmp/decoy.pem", "/tmp/falkdjaslkdj", "/tmp/priv.pem"])
|
||||
assert pcr.privkey
|
||||
cnonce, sig = pcr.respond_challenge()
|
||||
r.completedchallenge.add(name=challenge.name, type=r.ProofOfPossession, data=(cnonce,sig))
|
||||
if challenge.type == m.ProofOfPossession:
|
||||
pcr = POPChallengeResponder(*challenge.data)
|
||||
pcr.find_priv(["/tmp/pub.pem", "/tmp/decoy.pem", "/tmp/falkdjaslkdj", "/tmp/priv.pem"])
|
||||
assert pcr.privkey
|
||||
cnonce, sig = pcr.respond_challenge()
|
||||
r.completedchallenge.add(name=challenge.name, type=r.ProofOfPossession, data=(cnonce,sig))
|
||||
|
||||
for completedchallenge in r.completedchallenge:
|
||||
# If there's actually more than one then we'd need to store and use
|
||||
# multiple different values of snonce.
|
||||
print verify_challenge_response(open("/tmp/pub.pem").read(), snonce, *completedchallenge.data)
|
||||
if completedchallenge.type == r.ProofOfPossession:
|
||||
print verify_challenge_response(open("/tmp/pub.pem").read(), snonce, *completedchallenge.data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue