util.x509: Tell LuaSec we want UTF-8 data
authorKim Alvefur <zash@zash.se>
Mon, 18 May 2015 19:32:05 +0000 (21:32 +0200)
committerKim Alvefur <zash@zash.se>
Mon, 18 May 2015 19:32:05 +0000 (21:32 +0200)
util/x509.lua

index 5e1b49e501d3945fcce38593227b62649703d531..bf8d390661da35459434b16cee2b063b7849d8eb 100644 (file)
@@ -148,6 +148,9 @@ local function compare_srvname(host, service, asserted_names)
 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];