diff options
author | Kim Alvefur <zash@zash.se> | 2017-07-07 20:31:52 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-07-07 20:31:52 +0200 |
commit | eb481bfb43e58d6f6c1bd18f0761c077fa0263a4 (patch) | |
tree | f0ca0b0178bc2b732f8d8a82691a084c366c990a /net | |
parent | 41ea79ea5047fd3168263320362e8ee7094e0f75 (diff) | |
download | prosody-eb481bfb43e58d6f6c1bd18f0761c077fa0263a4.tar.gz prosody-eb481bfb43e58d6f6c1bd18f0761c077fa0263a4.zip |
net.http: Move default SSL/TLS settings into options, allowing them to be overriden in new()
Diffstat (limited to 'net')
-rw-r--r-- | net/http.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua index 0d14e526..756deaf4 100644 --- a/net/http.lua +++ b/net/http.lua @@ -196,7 +196,7 @@ local function request(self, u, ex, callback) local sslctx = false; if using_https then - sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" } }; + sslctx = ex and ex.sslctx or self.options and self.options.sslctx; end local handler, conn = server.addclient(host, port_number, listener, "*a", sslctx) @@ -239,7 +239,9 @@ local function new(options) return http; end -local default_http = new(); +local default_http = new({ + sslctx = { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" } }; +}); return { request = function (u, ex, callback) |