util.x509: Tell LuaSec we want UTF-8 data
authorKim Alvefur <zash@zash.se>
Mon, 18 May 2015 21:32:05 +0200
changeset 6711 d2beb98ece29
parent 6710 06cdd4afaaf9
child 6712 b6eff3ba13de
util.x509: Tell LuaSec we want UTF-8 data
util/x509.lua
--- a/util/x509.lua	Mon May 18 21:00:41 2015 +0200
+++ b/util/x509.lua	Mon May 18 21:32:05 2015 +0200
@@ -148,6 +148,9 @@
 end
 
 function verify_identity(host, service, cert)
+	if cert.setencode then
+		cert:setencode("utf8");
+	end
 	local ext = cert:extensions()
 	if ext[oid_subjectaltname] then
 		local sans = ext[oid_subjectaltname];