Diff

plugins/tls.lua @ 463:98fe3ed54639

Update to new tls_builder() API in net.server upstream
author Matthew Wild <mwild1@gmail.com>
date Thu, 16 Mar 2023 16:40:57 +0000
parent 428:bde804b01f28
line wrap: on
line diff
--- a/plugins/tls.lua	Thu Mar 16 11:47:37 2023 +0000
+++ b/plugins/tls.lua	Thu Mar 16 16:40:57 2023 +0000
@@ -18,7 +18,10 @@
 	local function handle_tls(tls_status)
 		if tls_status.name == "proceed" then
 			stream:debug("Server says proceed, handshake starting...");
-			stream.conn:starttls(stream.ssl or {mode="client", protocol="sslv23", options="no_sslv2",capath="/etc/ssl/certs"}, true);
+			local sslctx = verse.tls_builder(".")
+				:apply({mode="client", protocol="sslv23", options="no_sslv2",capath="/etc/ssl/certs"})
+				:apply(stream.ssl or {});
+			stream.conn:starttls(sslctx:build(), true);
 		end
 	end
 	local function handle_status(new_status)