util/prosodyctl/cert.lua
changeset 12391 05c250fa335a
parent 12223 0a44def211fa
child 12790 5d4957c8a972
equal deleted inserted replaced
12390:2d3080d02960 12391:05c250fa335a
   235 		end
   235 		end
   236 	end);
   236 	end);
   237 	for _, host in ipairs(hostnames) do
   237 	for _, host in ipairs(hostnames) do
   238 		local paths = cm.find_cert_in_index(files_by_name, host);
   238 		local paths = cm.find_cert_in_index(files_by_name, host);
   239 		if paths and imported[paths.certificate] then
   239 		if paths and imported[paths.certificate] then
   240 			-- One certificate, many mames!
   240 			-- One certificate, many names!
   241 			table.insert(imported, host);
   241 			table.insert(imported, host);
   242 		elseif paths then
   242 		elseif paths then
   243 			local c = copy(paths.certificate, cert_basedir .. "/" .. host .. ".crt", nil, owner, group);
   243 			local c = copy(paths.certificate, cert_basedir .. "/" .. host .. ".crt", nil, owner, group);
   244 			local k = copy(paths.key, cert_basedir .. "/" .. host .. ".key", "0377", owner, group);
   244 			local k = copy(paths.key, cert_basedir .. "/" .. host .. ".key", "0377", owner, group);
   245 			if c and k then
   245 			if c and k then