aboutsummaryrefslogtreecommitdiffstats
path: root/util/x509.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-08 17:48:37 +0100
committerKim Alvefur <zash@zash.se>2019-12-08 17:48:37 +0100
commit5ba23c972b8453806af6aeca573df96a366c68ef (patch)
treeb685b145f59e4338e7793854579f22d0e7a28af6 /util/x509.lua
parenta55d83ceb62bf0e8280829629782bc367ab185b8 (diff)
downloadprosody-5ba23c972b8453806af6aeca573df96a366c68ef.tar.gz
prosody-5ba23c972b8453806af6aeca573df96a366c68ef.zip
util.x509: Fix recording of CommonNames in get_identities
Don't worry, this function is not used by anything yet, this isn't a security issue. It'll be used by Prosody to pick the correct certificate for itself in the future. The `names` multitable is a collection of (name, service) pairs but it put them in the wrong order here.
Diffstat (limited to 'util/x509.lua')
-rw-r--r--util/x509.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/x509.lua b/util/x509.lua
index fe6e4b79..342dafde 100644
--- a/util/x509.lua
+++ b/util/x509.lua
@@ -266,7 +266,7 @@ local function get_identities(cert) --> map of names to sets of services
if dn.oid == oid_commonname then
local name = nameprep(dn.value);
if name and idna_to_ascii(name) then
- names:set("*", name, true);
+ names:set(name, "*", true);
end
end
end