mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -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:
committed by
Pavel Vomacka
parent
8f92a9bdc1
commit
6f8d90d97a
@@ -61,7 +61,7 @@ PEM = 0
|
|||||||
DER = 1
|
DER = 1
|
||||||
|
|
||||||
PEM_REGEX = re.compile(
|
PEM_REGEX = re.compile(
|
||||||
r'-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----',
|
b'-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----',
|
||||||
re.DOTALL)
|
re.DOTALL)
|
||||||
|
|
||||||
EKU_SERVER_AUTH = '1.3.6.1.5.5.7.3.1'
|
EKU_SERVER_AUTH = '1.3.6.1.5.5.7.3.1'
|
||||||
|
|||||||
@@ -298,7 +298,8 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
|||||||
obj += "trusted: true\n"
|
obj += "trusted: true\n"
|
||||||
elif trusted is False:
|
elif trusted is False:
|
||||||
obj += "x-distrusted: true\n"
|
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)
|
f.write(obj)
|
||||||
|
|
||||||
if ext_key_usage is not None and public_key_info not in has_eku:
|
if ext_key_usage is not None and public_key_info not in has_eku:
|
||||||
|
|||||||
Reference in New Issue
Block a user