Software /
code /
prosody
Comparison
core/certmanager.lua @ 8827:1a29b56a2d63
core.certmanager: Allow all non-whitespace in service name (fixes #1019)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 25 May 2018 03:30:16 +0200 |
parent | 8494:4f75f4da6d4e |
child | 8828:2a0d7fa4c56a |
comparison
equal
deleted
inserted
replaced
8819:780d728f969f | 8827:1a29b56a2d63 |
---|---|
155 end | 155 end |
156 | 156 |
157 local function create_context(host, mode, ...) | 157 local function create_context(host, mode, ...) |
158 local cfg = new_config(); | 158 local cfg = new_config(); |
159 cfg:apply(core_defaults); | 159 cfg:apply(core_defaults); |
160 local service_name, port = host:match("^(%w+) port (%d+)$"); | 160 local service_name, port = host:match("^(%S+) port (%d+)$"); |
161 if service_name then | 161 if service_name then |
162 cfg:apply(find_service_cert(service_name, tonumber(port))); | 162 cfg:apply(find_service_cert(service_name, tonumber(port))); |
163 else | 163 else |
164 cfg:apply(find_host_cert(host)); | 164 cfg:apply(find_host_cert(host)); |
165 end | 165 end |