diff options
author | Kim Alvefur <zash@zash.se> | 2014-03-22 12:02:11 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-03-22 12:02:11 +0100 |
commit | 9f59c549b2b19b5222a6625469170a4e787e3db5 (patch) | |
tree | 9a9f2b027b67c6b28cfc2ac229a981a2babcc529 | |
parent | ba084de527f2cb81a16465b84cc0e70f90a2bc1b (diff) | |
download | prosody-9f59c549b2b19b5222a6625469170a4e787e3db5.tar.gz prosody-9f59c549b2b19b5222a6625469170a4e787e3db5.zip |
prosodyctl: Show real error if certificate config file can't be opened
-rwxr-xr-x | prosodyctl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -684,7 +684,12 @@ function cert_commands.config(arg) conf.distinguished_name[k] = nv ~= "." and nv or nil; end end - local conf_file = io.open(conf_filename, "w"); + local conf_file, err = io.open(conf_filename, "w"); + if not conf_file then + show_warning("Could not open OpenSSL config file for writing"); + show_warning(err); + os.exit(1); + end conf_file:write(conf:serialize()); conf_file:close(); print(""); |