certmonger: fix storing retrieved certificates

This was a forgotten part from previous certificate refactoring which
would cause issues since the second part of results throughout the
dogtag-ipa-ca-renew-agent-submit is expected to be a string.

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

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-16 14:50:14 +02:00 committed by Pavel Vomacka
parent 2a73b5d739
commit 32be3ef622

View File

@ -314,7 +314,7 @@ def store_cert(**kwargs):
"Giving up. To retry storing the certificate, resubmit the "
"request with CA \"dogtag-ipa-ca-renew-agent-reuse\"")
return (ISSUED, cert)
return (ISSUED, cert.public_bytes(x509.Encoding.PEM).decode('ascii'))
def request_and_store_cert(**kwargs):