Read in ca certificate as binary for PY3
The comparison of bytes vs string of the CA certificate produces a false negative. This leads to rewriting certificates and affecting connectivity to services. The writing of the file was changed to bytes in https://github.com/juju/charm-helpers/pull/58/. Read in the certificate as bytes as well for a bytes vs bytes comparison. Change-Id: I64eb2b90776bb1e37de009208f016f176bd6a82a Closes-Bug: #1762431
This commit is contained in:
parent
c5b98f1a26
commit
9053e73d20
|
@ -76,7 +76,7 @@ def get_ca_cert():
|
|||
def retrieve_ca_cert(cert_file):
|
||||
cert = None
|
||||
if os.path.isfile(cert_file):
|
||||
with open(cert_file, 'r') as crt:
|
||||
with open(cert_file, 'rb') as crt:
|
||||
cert = crt.read()
|
||||
return cert
|
||||
|
||||
|
|
Loading…
Reference in New Issue