aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/x509.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/x509.lua b/util/x509.lua
index 342dafde..76b50076 100644
--- a/util/x509.lua
+++ b/util/x509.lua
@@ -232,8 +232,11 @@ local function get_identities(cert) --> map of names to sets of services
if sans then
if sans["dNSName"] then -- Valid for any service
for _, name in ipairs(sans["dNSName"]) do
+ local is_wildcard = name:sub(1, 2) == "*.";
+ if is_wildcard then name = name:sub(3); end
name = idna_to_unicode(nameprep(name));
if name then
+ if is_wildcard then name = "*." .. name; end
names:set(name, "*", true);
end
end