Comparison

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
comparison
equal deleted inserted replaced
10254:ddc8d5171da2 10255:8e8d3b3a55da
234 end 234 end
235 235
236 local subject = cert:subject(); 236 local subject = cert:subject();
237 for i = 1, #subject do 237 for i = 1, #subject do
238 local dn = subject[i]; 238 local dn = subject[i];
239 if dn.oid == oid_commonname and nameprep(dn.value) then 239 if dn.oid == oid_commonname then
240 names[dn.value] = true; 240 local name = nameprep(dn.value);
241 if name then
242 names[name] = true;
243 end
241 end 244 end
242 end 245 end
243 return names; 246 return names;
244 end 247 end
245 248