Comparison

prosodyctl @ 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
parent 4872:b2059452fb55
child 4881:eafed1728be3
comparison
equal deleted inserted replaced
4877:6f5b53cb3565 4878:80ab7c50608d
638 elseif k == "emailAddress" then 638 elseif k == "emailAddress" then
639 v = "xmpp@" .. arg[1]; 639 v = "xmpp@" .. arg[1];
640 end 640 end
641 nv = show_prompt(("%s (%s):"):format(k, nv or v)); 641 nv = show_prompt(("%s (%s):"):format(k, nv or v));
642 nv = (not nv or nv == "") and v or nv; 642 nv = (not nv or nv == "") and v or nv;
643 if nv:find"[\192-\252][\128-\191]+" then
644 conf.req.string_mask = "utf8only"
645 end
643 conf.distinguished_name[k] = nv ~= "." and nv or nil; 646 conf.distinguished_name[k] = nv ~= "." and nv or nil;
644 end 647 end
645 local conf_file = io.open(conf_filename, "w"); 648 local conf_file = io.open(conf_filename, "w");
646 conf_file:write(conf:serialize()); 649 conf_file:write(conf:serialize());
647 conf_file:close(); 650 conf_file:close();