mirror of
https://github.com/certbot/certbot.git
synced 2026-06-14 19:20:09 -04:00
add make_request() to help prepare signing requests
This commit is contained in:
parent
14d73231c0
commit
da47a260bc
1 changed files with 10 additions and 1 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue