Changeset

10256:b2e7b07f8b74

util.x509: Only collect commonNames that pass idna Weeds out "Example Certificate" and the like, which are uninteresting for this function.
author Kim Alvefur <zash@zash.se>
date Tue, 10 Sep 2019 18:17:13 +0200
parents 10255:8e8d3b3a55da
children 10258:4ff2f14f9ac7
files util/x509.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/x509.lua	Tue Sep 10 18:16:11 2019 +0200
+++ b/util/x509.lua	Tue Sep 10 18:17:13 2019 +0200
@@ -238,7 +238,7 @@
 		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