Software /
code /
prosody
Diff
core/certmanager.lua @ 13116:58e793288d9c
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 27 May 2023 15:40:49 +0200 |
parent | 13115:749376d75b40 |
child | 13179:1b1ed555f307 |
line wrap: on
line diff
--- a/core/certmanager.lua Sat May 27 15:39:26 2023 +0200 +++ b/core/certmanager.lua Sat May 27 15:40:49 2023 +0200 @@ -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 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