mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:30:31 +02:00
add make_request() to help prepare signing requests
This commit is contained in:
+10
-1
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from chocolate_protocol_pb2 import chocolatemessage
|
||||
import urllib2, os, sys
|
||||
import urllib2, os, sys, time
|
||||
|
||||
try:
|
||||
upstream = "https://%s/chocolate.py" % os.environ["CHOCOLATESERVER"]
|
||||
@@ -17,4 +17,13 @@ def do(m):
|
||||
def decode(m):
|
||||
return str(chocolatemessage.FromString(m))
|
||||
|
||||
def make_request(m):
|
||||
m.request.add()
|
||||
m.request[0].nonce = "blah"
|
||||
m.request[0].recipient = "ca.example.com"
|
||||
m.request[0].timestamp = int(time.time())
|
||||
m.request[0].csr = "FOO"
|
||||
m.request[0].sig = "BAR"
|
||||
|
||||
m = chocolatemessage()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user