X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=prosodyctl;h=d341a75bbabb7a5e131626e80f6628df85ff74b0;hb=df2dc10edd007675428a94e6894a55d5a00bea6a;hp=247b099a94f73a30109a7139e45103a9fe32332f;hpb=2751b413f8a0d7fce6a8fb0dfa68523e7065b465;p=prosody.git diff --git a/prosodyctl b/prosodyctl index 247b099a..d341a75b 100755 --- a/prosodyctl +++ b/prosodyctl @@ -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("");