aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/x509.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/x509.lua b/util/x509.lua
index 1cdf07dc..c4001ecb 100644
--- a/util/x509.lua
+++ b/util/x509.lua
@@ -236,8 +236,11 @@ local function get_identities(cert) --> set of names
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;