Software /
code /
prosody
Comparison
core/certmanager.lua @ 5287:676a1a032d2f
certmanager: Fix nil index if no LuaSec available
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Jan 2013 02:17:07 +0100 |
parent | 5282:4cd57cb49f99 |
child | 5377:898454038524 |
comparison
equal
deleted
inserted
replaced
5286:0cbe57fbe2cd | 5287:676a1a032d2f |
---|---|
31 local default_capath = "/etc/ssl/certs"; | 31 local default_capath = "/etc/ssl/certs"; |
32 local default_verify = (ssl and ssl.x509 and { "peer", "client_once", }) or "none"; | 32 local default_verify = (ssl and ssl.x509 and { "peer", "client_once", }) or "none"; |
33 local default_options = { "no_sslv2", luasec_has_noticket and "no_ticket" or nil }; | 33 local default_options = { "no_sslv2", luasec_has_noticket and "no_ticket" or nil }; |
34 local default_verifyext = { "lsec_continue", "lsec_ignore_purpose" }; | 34 local default_verifyext = { "lsec_continue", "lsec_ignore_purpose" }; |
35 | 35 |
36 if not luasec_has_verifyext and ssl.x509 then | 36 if ssl and not luasec_has_verifyext and ssl.x509 then |
37 -- COMPAT mw/luasec-hg | 37 -- COMPAT mw/luasec-hg |
38 for i=1,#default_verifyext do -- Remove lsec_ prefix | 38 for i=1,#default_verifyext do -- Remove lsec_ prefix |
39 default_verify[#default_verify+1] = default_verifyext[i]:sub(6); | 39 default_verify[#default_verify+1] = default_verifyext[i]:sub(6); |
40 end | 40 end |
41 end | 41 end |