[SSL] fix validate_writeable_directory

We have to exmand user if ~ was used in path and we have to use
normpath in order not to traverse nonexisting directory and remove
trailing /.

Change-Id: Ic44917b6a1e01c9565cef1df60ed57d3da39cf33
This commit is contained in:
Lukas Bezdicka
2015-05-28 11:29:30 +02:00
parent 185b932c42
commit fb99b80db5
6 changed files with 15 additions and 6 deletions

View File

@@ -137,7 +137,7 @@ def generate_ssl_cert(config, host, service, ssl_key_file, ssl_cert_file):
final_cert = crypto.dump_certificate(crypto.FILETYPE_PEM, cert)
final_key = crypto.dump_privatekey(crypto.FILETYPE_PEM, k)
deliver_ssl_file(ca_file, config['CONFIG_SSL_CACERT_FILE'], host)
deliver_ssl_file(ca_file, config['CONFIG_SSL_CACERT'], host)
deliver_ssl_file(final_cert, ssl_cert_file, host)
deliver_ssl_file(final_key, ssl_key_file, host)