diff util/x509.lua @ 6708:d2beb98ece29

util.x509: Tell LuaSec we want UTF-8 data
author Kim Alvefur <zash@zash.se>
date Mon, 18 May 2015 21:32:05 +0200
parents 8fb54ec34741
children 5de6b93d0190
line wrap: on
line diff
--- 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];