# HG changeset patch # User Kim Alvefur # Date 1395486131 -3600 # Node ID 1b5ca55bf895d19a8c34a13835cdd0d46c330dd5 # Parent ee14da71d3fc93e79674ff4258a62f4cb5a6181d prosodyctl: Show real error if certificate config file can't be opened diff -r ee14da71d3fc -r 1b5ca55bf895 prosodyctl --- a/prosodyctl Sat Mar 22 12:42:01 2014 +0100 +++ b/prosodyctl Sat Mar 22 12:02:11 2014 +0100 @@ -684,7 +684,12 @@ 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("");