make certif 0o600 also.

This commit is contained in:
Matthias Bussonnier 2015-12-08 10:01:25 +01:00
parent efc7e8f4ea
commit de405586e3

View File

@ -56,8 +56,11 @@ def create_self_signed_cert(cert_dir, keyfile, certfile):
with io.open(join(cert_dir, certfile), "wt") as f:
f.write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert).decode('utf8'))
os.chmod(join(cert_dir, certfile), 0o600)
with io.open(join(cert_dir, keyfile), "wt") as f:
f.write(crypto.dump_privatekey(crypto.FILETYPE_PEM, k).decode('utf8'))
os.chmod(join(cert_dir, keyfile), 0o600)