This commit is contained in:
parent
7abec3faa3
commit
621c8d64af
@ -37,7 +37,8 @@ def get_pki_cert(url="http://pki",
|
||||
headers={"Content-Type":"application/json"})
|
||||
authstring = base64.b64encode(f"{username}:{password}".encode()).decode()
|
||||
req.add_header("Authorization", f"Basic {authstring}")
|
||||
res = urlopen(req, json.dumps(domains))
|
||||
jsondata = json.dumps(domains)
|
||||
res = urlopen(req, jsondata.encode('utf-8'))
|
||||
resj = json.loads(res.read())
|
||||
|
||||
return resj["certificate"], resj["privatekey"]
|
||||
|
Loading…
Reference in New Issue
Block a user