aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-10 18:17:13 +0200
committerKim Alvefur <zash@zash.se>2019-09-10 18:17:13 +0200
commit833d955c39a5bf1036e507f85d9893664efa6c7f (patch)
tree8b40e302983b87bf51834427e573c64e51fe1d56
parent4caae044218601c3abf448776a6c0909f9135bd8 (diff)
downloadprosody-833d955c39a5bf1036e507f85d9893664efa6c7f.tar.gz
prosody-833d955c39a5bf1036e507f85d9893664efa6c7f.zip
util.x509: Only collect commonNames that pass idna
Weeds out "Example Certificate" and the like, which are uninteresting for this function.
-rw-r--r--util/x509.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/x509.lua b/util/x509.lua
index c4001ecb..82f8285d 100644
--- a/util/x509.lua
+++ b/util/x509.lua
@@ -238,7 +238,7 @@ local function get_identities(cert) --> set of names
local dn = subject[i];
if dn.oid == oid_commonname then
local name = nameprep(dn.value);
- if name then
+ if name and idna_to_ascii(name) then
names[name] = true;
end
end