python3: port certmonger requests script

This commit fixes requesting certificates via certmonger in Python 3.
This includes dogtag-ipa-ca-renew-agent-submit script and scripts
used during the scripts restarting.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Stanislav Laznicka
2017-08-16 15:39:06 +02:00
committed by Pavel Vomacka
parent a3c11b01af
commit 7ef6de931b
2 changed files with 17 additions and 12 deletions

View File

@@ -351,7 +351,8 @@ class DogtagInstance(service.Service):
cs_cfg,
directive,
# the cert must be only the base64 string without headers
base64.b64encode(cert.public_bytes(x509.Encoding.DER)),
(base64.b64encode(cert.public_bytes(x509.Encoding.DER))
.decode('ascii')),
quotes=False,
separator='=')