Comparison

core/certmanager.lua @ 11591:e7a964572f6b

core.certmanager: Skip service certificate lookup for https client Quick Fix\u{2122} to stop prevent certmanager from automatically adding a client certificate for net.http.request, since this normally does not require such.
author Kim Alvefur <zash@zash.se>
date Thu, 27 May 2021 09:22:07 +0200
parent 11560:3bbb1af92514
child 11709:5810166f35d5
comparison
equal deleted inserted replaced
11590:5aafb832c91b 11591:e7a964572f6b
262 262
263 local function create_context(host, mode, ...) 263 local function create_context(host, mode, ...)
264 local cfg = new_config(); 264 local cfg = new_config();
265 cfg:apply(core_defaults); 265 cfg:apply(core_defaults);
266 local service_name, port = host:match("^(%S+) port (%d+)$"); 266 local service_name, port = host:match("^(%S+) port (%d+)$");
267 if service_name then 267 -- port 0 is used with client-only things that normally don't need certificates, e.g. https
268 if service_name and port ~= "0" then
268 log("debug", "Automatically locating certs for service %s on port %s", service_name, port); 269 log("debug", "Automatically locating certs for service %s on port %s", service_name, port);
269 cfg:apply(find_service_cert(service_name, tonumber(port))); 270 cfg:apply(find_service_cert(service_name, tonumber(port)));
270 else 271 else
271 log("debug", "Automatically locating certs for host %s", host); 272 log("debug", "Automatically locating certs for host %s", host);
272 cfg:apply(find_host_cert(host)); 273 cfg:apply(find_host_cert(host));