Open file as binary to write bytes
Due to a change in the return types in the base64 decoded data, we should open these files in binary mode to write the byte streams directly. Change-Id: I9f88a71406b1e6ea774fdbbeea4ba447901fe5c2 Closes-Bug: #1800436
This commit is contained in:
parent
e4d209fdc1
commit
f20ea273f9
|
@ -359,9 +359,9 @@ class ConsoleSSLContext(ch_context.OSContextGenerator):
|
|||
decode_ssl_key = base64.b64decode(
|
||||
hookenv.config('console-ssl-key'))
|
||||
|
||||
with open(cert_path, 'w') as fh:
|
||||
with open(cert_path, 'wb') as fh:
|
||||
fh.write(decode_ssl_cert)
|
||||
with open(key_path, 'w') as fh:
|
||||
with open(key_path, 'wb') as fh:
|
||||
fh.write(decode_ssl_key)
|
||||
|
||||
ctxt['ssl_only'] = True
|
||||
|
|
Loading…
Reference in New Issue