Comment 5 for bug 1762431

Revision history for this message
Nobuto Murata (nobuto) wrote :

The reason behind 2. seems as follows.

(Pdb) l
 85 import pdb; pdb.set_trace()
 86 if ca_cert:
 87 cert_file = ('/usr/local/share/ca-certificates/'
 88 'keystone_juju_ca_cert.crt')
 89 old_cert = retrieve_ca_cert(cert_file)
 90 -> if old_cert and old_cert == ca_cert:
 91 log("CA cert is the same as installed version", level=INFO)
 92 else:
 93 log("Installing new CA cert", level=INFO)
 94 with open(cert_file, 'wb') as crt:
 95 crt.write(ca_cert)
(Pdb) old_cert
'-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n'
(Pdb) ca_cert
b'-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n'

^^^ certs are identical, but the diff if plain text vs binary.