diff options
author | Waqas Hussain <waqas20@gmail.com> | 2013-01-22 08:30:38 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2013-01-22 08:30:38 +0500 |
commit | 0f2d3d7139c741b6bd8714048694ee16a9b11c91 (patch) | |
tree | 9938dd9411cf02b2c7cc7a82103633f7378030b8 /util/openssl.lua | |
parent | 1ae08f23d712da167747a7d59feac9965d6ef9ac (diff) | |
parent | b1f22daa932ac857022412e734533ff05bad1594 (diff) | |
download | prosody-0f2d3d7139c741b6bd8714048694ee16a9b11c91.tar.gz prosody-0f2d3d7139c741b6bd8714048694ee16a9b11c91.zip |
Merge 0.9->trunk
Diffstat (limited to 'util/openssl.lua')
-rw-r--r-- | util/openssl.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/util/openssl.lua b/util/openssl.lua index 8fdb9b4a..b3dc2943 100644 --- a/util/openssl.lua +++ b/util/openssl.lua @@ -72,15 +72,11 @@ local function ia5string(s) return s_format("IA5STRING:%s", s); end -local util = {}; _M.util = { utf8string = utf8string, ia5string = ia5string, }; -local function xmppAddr(t, host) -end - function ssl_config:add_dNSName(host) t_insert(self.subject_alternative_name.DNS, idna_to_ascii(host)); end @@ -95,12 +91,12 @@ function ssl_config:add_xmppAddr(host) s_format("%s;%s", oid_xmppaddr, utf8string(host))); end -function ssl_config:from_prosody(hosts, config, certhosts, raw) +function ssl_config:from_prosody(hosts, config, certhosts) -- TODO Decide if this should go elsewhere local found_matching_hosts = false; for i = 1,#certhosts do local certhost = certhosts[i]; - for name, host in pairs(hosts) do + for name in pairs(hosts) do if name == certhost or name:sub(-1-#certhost) == "."..certhost then found_matching_hosts = true; self:add_dNSName(name); @@ -137,7 +133,7 @@ do -- Lua to shell calls. end end end - for k,v in ipairs(o) do + for _,v in ipairs(o) do t_insert(r, ("'%s'"):format(shell_escape(tostring(v)))); end return t_concat(r, " "); @@ -145,7 +141,7 @@ do -- Lua to shell calls. local os_execute = os.execute; setmetatable(_M, { - __index=function(self,f) + __index=function(_,f) return function(opts) return 0 == os_execute(serialize(f, type(opts) == "table" and opts or {})); end; |