mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
client: make ipa-client-install py3 compatible
This commit enables ipa-client-install to be installable in Python 3 and makes it run in Python 3 by default. https://pagure.io/freeipa/issue/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
This commit is contained in:
parent
8f92a9bdc1
commit
6f8d90d97a
@ -61,7 +61,7 @@ PEM = 0
|
||||
DER = 1
|
||||
|
||||
PEM_REGEX = re.compile(
|
||||
r'-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----',
|
||||
b'-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----',
|
||||
re.DOTALL)
|
||||
|
||||
EKU_SERVER_AUTH = '1.3.6.1.5.5.7.3.1'
|
||||
|
@ -298,7 +298,8 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
obj += "trusted: true\n"
|
||||
elif trusted is False:
|
||||
obj += "x-distrusted: true\n"
|
||||
obj += "{pem}\n\n".format(pem=cert.public_bytes(x509.Encoding.PEM))
|
||||
obj += "{pem}\n\n".format(
|
||||
pem=cert.public_bytes(x509.Encoding.PEM).decode('ascii'))
|
||||
f.write(obj)
|
||||
|
||||
if ext_key_usage is not None and public_key_info not in has_eku:
|
||||
|
Loading…
Reference in New Issue
Block a user