diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-05-22 14:32:02 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-05-22 14:32:02 +0100 |
commit | 3930549d74266c8035e2561a195bdce36b3fa350 (patch) | |
tree | 13872ff107d3d877e96393466b0c0ac8bfc76773 /core | |
parent | 1faca44dc829fe67d2fa7b720027324d6ad1aa55 (diff) | |
download | prosody-3930549d74266c8035e2561a195bdce36b3fa350.tar.gz prosody-3930549d74266c8035e2561a195bdce36b3fa350.zip |
certmanager: Disable SSL compression if possible (LuaSec 0.5 or 0.4.1+OpenSSL 1.x)
Diffstat (limited to 'core')
-rw-r--r-- | core/certmanager.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua index b91f7110..49f445f6 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -17,11 +17,12 @@ local prosody = prosody; local resolve_path = configmanager.resolve_relative_path; local config_path = prosody.paths.config; -local luasec_has_noticket, luasec_has_verifyext; +local luasec_has_noticket, luasec_has_verifyext, luasec_has_no_compression; if ssl then local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); luasec_has_noticket = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4; luasec_has_verifyext = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=5; + luasec_has_no_compression = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=5; end module "certmanager" @@ -39,6 +40,9 @@ if ssl and not luasec_has_verifyext and ssl.x509 then default_verify[#default_verify+1] = default_verifyext[i]:sub(6); end end +if luasec_has_no_compression and configmanager.get("*", "ssl_compression") ~= true then + default_options[#default_options+1] = "no_compression"; +end function create_context(host, mode, user_ssl_config) user_ssl_config = user_ssl_config or default_ssl_config; |