1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

Merge branch 'master' of github.com:research/chocolate

This commit is contained in:
Eric Wustrow
2012-07-12 14:55:06 -04:00
2 changed files with 19 additions and 2 deletions

View File

@@ -35,5 +35,22 @@ def make_request(m):
def sign(k, m):
m.request.sig = CSR.sign(k, sha256("(%d) (%s) (%s)" % (m.request.timestamp, m.request.recipient, m.request.csr)))
k=chocolatemessage(); m=chocolatemessage(); init(k); init(m); make_request(m); m.request.csr = open("req.pem").read(); sign(open("key.pem").read(), m); r=decode(do(m)); print (r); k.session = r.session; print decode(do(k))
k=chocolatemessage()
m=chocolatemessage()
init(k)
init(m)
make_request(m)
m.request.csr = open("req.pem").read()
sign(open("key.pem").read(), m)
r=decode(do(m))
print r
while r.proceed.IsInitialized():
if r.proceed.polldelay > 60: r.proceed.polldelay = 60
print "waiting", r.proceed.polldelay
time.sleep(r.proceed.polldelay)
k.session = r.session
r = decode(do(k))
print r
for chall in r.challenges:
print chall

View File

@@ -341,7 +341,7 @@ class session(object):
def GET(self):
web.header("Content-type", "text/html")
return "Hello, world! This server only accepts POST requests."
return "Hello, world! This server only accepts POST requests.\r\n"
if __name__ == "__main__":
app = web.application(urls, globals())