Software /
code /
prosody
Changeset
10255:8e8d3b3a55da
util.x509: Nameprep commonName once
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 10 Sep 2019 18:16:11 +0200 |
parents | 10254:ddc8d5171da2 |
children | 10256:b2e7b07f8b74 |
files | util/x509.lua |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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;