Software /
code /
prosody
Diff
util/x509.lua @ 10255:8e8d3b3a55da
util.x509: Nameprep commonName once
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 10 Sep 2019 18:16:11 +0200 |
parent | 9907:54e36a8677bc |
child | 10256:b2e7b07f8b74 |
line wrap: on
line diff
--- 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;