aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-27 15:40:49 +0200
committerKim Alvefur <zash@zash.se>2023-05-27 15:40:49 +0200
commite6f0e0b9d0065fcc94e1c570e48a64b5587a058b (patch)
tree382616406167b4424f54159c052698003d6ce211 /core/certmanager.lua
parent296710c701edda6697bc9dd537e83bf38dbc9289 (diff)
downloadprosody-e6f0e0b9d0065fcc94e1c570e48a64b5587a058b.tar.gz
prosody-e6f0e0b9d0065fcc94e1c570e48a64b5587a058b.zip
net.tls_luasec: Expose method for loading a certificate
Further isolates LuaSec from Prosody core, with the ultimate goal of allowing LuaSec to be replaced more easily.
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index 82cfd277..5775018d 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -6,7 +6,6 @@
-- COPYING file in the source package for more information.
--
-local ssl = require "ssl";
local configmanager = require "prosody.core.configmanager";
local log = require "prosody.util.logger".init("certmanager");
local new_config = require"prosody.net.server".tls_builder;
@@ -98,7 +97,7 @@ local function index_certs(dir, files_by_name, depth_limit)
local firstline = f:read();
if firstline == "-----BEGIN CERTIFICATE-----" and lfs.attributes(find_matching_key(full), "mode") == "file" then
f:seek("set")
- local cert = ssl.loadcertificate(f:read("*a"))
+ local cert = tls.load_certificate(f:read("*a"))
-- TODO if more than one cert is found for a name, the most recently
-- issued one should be used.
-- for now, just filter out expired certs