projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.10->trunk
[prosody.git]
/
util
/
sslconfig.lua
diff --git
a/util/sslconfig.lua
b/util/sslconfig.lua
index 98e61341f53c9ad708d08043b6139d6d90593eb1..71f27c9460f6548ab816e843d8012ddef25425c1 100644
(file)
--- a/
util/sslconfig.lua
+++ b/
util/sslconfig.lua
@@
-1,3
+1,11
@@
+local type = type;
+local pairs = pairs;
+local rawset = rawset;
+local t_concat = table.concat;
+local t_insert = table.insert;
+local setmetatable = setmetatable;
+
+local _ENV = nil;
local handlers = { };
local finalisers = { };
local handlers = { };
local finalisers = { };
@@
-6,11
+14,11
@@
local id = function (v) return v end
function handlers.options(a, k, b)
local o = a[k] or { };
if type(b) ~= "table" then b = { b } end
function handlers.options(a, k, b)
local o = a[k] or { };
if type(b) ~= "table" then b = { b } end
- for k
,v
in pairs(b) do
- if v
== true or v
== false then
- o[k
] = v
;
+ for k
ey, value
in pairs(b) do
+ if v
alue == true or value
== false then
+ o[k
ey] = value
;
else
else
- o[v] = true;
+ o[v
alue
] = true;
end
end
a[k] = o;
end
end
a[k] = o;
@@
-34,7
+42,7
@@
finalisers.verifyext = finalisers.options;
function finalisers.ciphers(a)
if type(a) == "table" then
function finalisers.ciphers(a)
if type(a) == "table" then
- return t
able.
concat(a, ":");
+ return t
_
concat(a, ":");
end
return a;
end
end
return a;
end
@@
-47,7
+55,7
@@
local function protocol(a)
if min_protocol then
a.protocol = "sslv23";
for i = 1, min_protocol do
if min_protocol then
a.protocol = "sslv23";
for i = 1, min_protocol do
- t
able.
insert(a.options, "no_"..protocols[i]);
+ t
_
insert(a.options, "no_"..protocols[i]);
end
end
end
end
end
end