Changeset

10494:69e55b03d5cf

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.
author Kim Alvefur <zash@zash.se>
date Sun, 08 Dec 2019 17:48:37 +0100
parents 10493:d9132e7412b8
children 10495:8ea685ec0979
files util/x509.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/x509.lua	Sun Dec 08 17:00:45 2019 +0100
+++ b/util/x509.lua	Sun Dec 08 17:48:37 2019 +0100
@@ -266,7 +266,7 @@
 		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