Software / code / prosody
Comparison
prosodyctl @ 8198:db82ce3decee
prosody, prosodyctl: Set up TLS settings for HTTPS requests in net.http (part of fix for #659)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 07 Jul 2017 20:42:35 +0200 |
| parent | 8190:331caee0c774 |
| child | 8201:a0ad62a269df |
| child | 8202:85a60e863509 |
comparison
equal
deleted
inserted
replaced
| 8197:55826e29c719 | 8198:db82ce3decee |
|---|---|
| 249 | 249 |
| 250 local modulemanager = require "core.modulemanager" | 250 local modulemanager = require "core.modulemanager" |
| 251 | 251 |
| 252 local prosodyctl = require "util.prosodyctl" | 252 local prosodyctl = require "util.prosodyctl" |
| 253 local socket = require "socket" | 253 local socket = require "socket" |
| 254 | |
| 255 local http = require "net.http" | |
| 256 local config_ssl = config.get("*", "ssl") | |
| 257 local https_client = config.get("*", "client_https_ssl") | |
| 258 http.default.options.sslctx = require "core.certmanager".create_context("client_https port 0", "client", | |
| 259 { capath = config_ssl.capath, cafile = config_ssl.cafile, verify = "peer", }, https_client); | |
| 260 | |
| 254 ----------------------- | 261 ----------------------- |
| 255 | 262 |
| 256 -- FIXME: Duplicate code waiting for util.startup | 263 -- FIXME: Duplicate code waiting for util.startup |
| 257 function read_version() | 264 function read_version() |
| 258 -- Try to determine version | 265 -- Try to determine version |