Comparison

core/certmanager.lua @ 8828:2a0d7fa4c56a

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 25 May 2018 03:33:13 +0200
parent 8555:4f0f5b49bb03
parent 8827:1a29b56a2d63
child 9852:6ea3cafb6ac3
child 10709:fcf7f50ccdd0
comparison
equal deleted inserted replaced
8826:d614003a82c1 8828:2a0d7fa4c56a
156 end 156 end
157 157
158 local function create_context(host, mode, ...) 158 local function create_context(host, mode, ...)
159 local cfg = new_config(); 159 local cfg = new_config();
160 cfg:apply(core_defaults); 160 cfg:apply(core_defaults);
161 local service_name, port = host:match("^(%w+) port (%d+)$"); 161 local service_name, port = host:match("^(%S+) port (%d+)$");
162 if service_name then 162 if service_name then
163 cfg:apply(find_service_cert(service_name, tonumber(port))); 163 cfg:apply(find_service_cert(service_name, tonumber(port)));
164 else 164 else
165 cfg:apply(find_host_cert(host)); 165 cfg:apply(find_host_cert(host));
166 end 166 end