Mercurial > prosody-modules
comparison mod_tls_policy/mod_tls_policy.lua @ 1891:a43ed0d28918
mod_tls_policy: Change the FS shortcut to match on ciphers with (EC)DHE (produces nicer stream error)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 02 Oct 2015 03:53:34 +0200 |
parents | d0fd8a29b724 |
children | 1b701f208b1b |
comparison
equal
deleted
inserted
replaced
1890:2eac15ab605e | 1891:a43ed0d28918 |
---|---|
2 assert(require"ssl.core".info, "Incompatible LuaSec version"); | 2 assert(require"ssl.core".info, "Incompatible LuaSec version"); |
3 | 3 |
4 local function hook(event_name, typ, policy) | 4 local function hook(event_name, typ, policy) |
5 if not policy then return end | 5 if not policy then return end |
6 if policy == "FS" then | 6 if policy == "FS" then |
7 policy = { key = "DH$" }; | 7 policy = { cipher = "^E?C?DHE%-" }; |
8 elseif type(policy) == "string" then | 8 elseif type(policy) == "string" then |
9 policy = { cipher = policy }; | 9 policy = { cipher = policy }; |
10 end | 10 end |
11 | 11 |
12 module:hook(event_name, function (event) | 12 module:hook(event_name, function (event) |