Diff

util/sslconfig.lua @ 6777:5de6b93d0190

util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author Kim Alvefur <zash@zash.se>
date Sat, 21 Feb 2015 10:36:37 +0100
parent 6671:2d5e2ed44c22
child 7004:ddb03cc4ce04
line wrap: on
line diff
--- a/util/sslconfig.lua	Mon Aug 10 22:16:05 2015 +0200
+++ b/util/sslconfig.lua	Sat Feb 21 10:36:37 2015 +0100
@@ -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 = { };
@@ -34,7 +42,7 @@
 
 function finalisers.ciphers(a)
 	if type(a) == "table" then
-		return table.concat(a, ":");
+		return t_concat(a, ":");
 	end
 	return a;
 end
@@ -47,7 +55,7 @@
 	if min_protocol then
 		a.protocol = "sslv23";
 		for i = 1, min_protocol do
-			table.insert(a.options, "no_"..protocols[i]);
+			t_insert(a.options, "no_"..protocols[i]);
 		end
 	end
 end