# HG changeset patch # User Kim Alvefur # Date 1568132171 -7200 # Node ID 8e8d3b3a55da3ecad3089b740bdb1b7dd3d0b49e # Parent ddc8d5171da275a01ecb20baa843e961cdcebc92 util.x509: Nameprep commonName once diff -r ddc8d5171da2 -r 8e8d3b3a55da util/x509.lua --- a/util/x509.lua Mon Sep 09 19:54:59 2019 +0200 +++ b/util/x509.lua Tue Sep 10 18:16:11 2019 +0200 @@ -236,8 +236,11 @@ local subject = cert:subject(); for i = 1, #subject do local dn = subject[i]; - if dn.oid == oid_commonname and nameprep(dn.value) then - names[dn.value] = true; + if dn.oid == oid_commonname then + local name = nameprep(dn.value); + if name then + names[name] = true; + end end end return names;