Charm-helpers sync to fix CA cert comparison
The comparison of bytes vs string of the CA certificate produces a false negative. This leads to rewriting certificates and affecting connectivity to services. Read in the certificate as bytes as well for a bytes vs bytes comparison. Closes-Bug: #1762431 Change-Id: Ic226149cc124ac5b84ab30d95a590f08489c67f2
This commit is contained in:
parent
a189c3da80
commit
92f5248a07
|
@ -77,7 +77,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
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ ARCH_TO_PROPOSED_POCKET = {
|
|||
'x86_64': PROPOSED_POCKET,
|
||||
'ppc64le': PROPOSED_PORTS_POCKET,
|
||||
'aarch64': PROPOSED_PORTS_POCKET,
|
||||
's390x': PROPOSED_PORTS_POCKET,
|
||||
}
|
||||
CLOUD_ARCHIVE_URL = "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
||||
CLOUD_ARCHIVE_KEY_ID = '5EDB1B62EC4926EA'
|
||||
|
|
Loading…
Reference in New Issue