Software /
code /
prosody
Changeset
4899:0b8134015635
certmanager: Don't use no_ticket option before LuaSec 0.4
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 19 May 2012 21:53:43 +0100 |
parents | 4898:010c01841ed0 |
children | 4900:d885ca14362d |
files | core/certmanager.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/certmanager.lua Sat May 19 22:05:23 2012 +0200 +++ b/core/certmanager.lua Sat May 19 21:53:43 2012 +0100 @@ -17,13 +17,16 @@ local resolve_path = configmanager.resolve_relative_path; local config_path = prosody.paths.config; +local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); +local luasec_has_noticket = luasec_major>0 or luasec_minor>=4; + module "certmanager" -- Global SSL options if not overridden per-host local default_ssl_config = configmanager.get("*", "core", "ssl"); local default_capath = "/etc/ssl/certs"; local default_verify = (ssl and ssl.x509 and { "peer", "client_once", "continue", "ignore_purpose" }) or "none"; -local default_options = { "no_sslv2", "no_ticket" }; +local default_options = { "no_sslv2", luasec_has_noticket and "no_ticket" or nil }; function create_context(host, mode, user_ssl_config) user_ssl_config = user_ssl_config or default_ssl_config;