Changeset

4878:80ab7c50608d

prosodyctl: Fix for generating certs with UTF-8
author Kim Alvefur <zash@zash.se>
date Mon, 14 May 2012 18:04:32 +0200
parents 4877:6f5b53cb3565
children 4879:45bb378a4a98
files prosodyctl
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Mon May 14 17:58:51 2012 +0200
+++ b/prosodyctl	Mon May 14 18:04:32 2012 +0200
@@ -640,6 +640,9 @@
 			end
 			nv = show_prompt(("%s (%s):"):format(k, nv or v));
 			nv = (not nv or nv == "") and v or nv;
+			if nv:find"[\192-\252][\128-\191]+" then
+				conf.req.string_mask = "utf8only"
+			end
 			conf.distinguished_name[k] = nv ~= "." and nv or nil;
 		end
 		local conf_file = io.open(conf_filename, "w");