updated pki modules
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2024-04-20 16:26:51 +02:00
parent 7abec3faa3
commit 621c8d64af

View File

@ -37,7 +37,8 @@ def get_pki_cert(url="http://pki",
headers={"Content-Type":"application/json"}) headers={"Content-Type":"application/json"})
authstring = base64.b64encode(f"{username}:{password}".encode()).decode() authstring = base64.b64encode(f"{username}:{password}".encode()).decode()
req.add_header("Authorization", f"Basic {authstring}") 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()) resj = json.loads(res.read())
return resj["certificate"], resj["privatekey"] return resj["certificate"], resj["privatekey"]