Software /
code /
verse
Comparison
plugins/tls.lua @ 384:532a379acfea
plugins.tls: Allow configuring TLS options at stream.ssl
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 17 May 2015 14:59:28 +0200 |
parent | 380:0891b4e27766 |
child | 428:bde804b01f28 |
comparison
equal
deleted
inserted
replaced
383:72be3c2cf602 | 384:532a379acfea |
---|---|
16 end | 16 end |
17 end | 17 end |
18 local function handle_tls(tls_status) | 18 local function handle_tls(tls_status) |
19 if tls_status.name == "proceed" then | 19 if tls_status.name == "proceed" then |
20 stream:debug("Server says proceed, handshake starting..."); | 20 stream:debug("Server says proceed, handshake starting..."); |
21 stream.conn:starttls({mode="client", protocol="sslv23", options="no_sslv2"}, true); | 21 stream.conn:starttls(stream.ssl or {mode="client", protocol="sslv23", options="no_sslv2",capath="/etc/ssl/certs"}, true); |
22 end | 22 end |
23 end | 23 end |
24 local function handle_status(new_status) | 24 local function handle_status(new_status) |
25 if new_status == "ssl-handshake-complete" then | 25 if new_status == "ssl-handshake-complete" then |
26 stream.secure = true; | 26 stream.secure = true; |