Mercurial > prosody-modules
comparison mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1358:497e1df4b7ee
mod_s2s_auth_dane: Abort module loading if luaunbound is unavailable
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 19 Mar 2014 14:04:09 +0100 |
| parents | a74ba847195a |
| children | 74769c0c79f8 |
comparison
equal
deleted
inserted
replaced
| 1357:67990f8d8228 | 1358:497e1df4b7ee |
|---|---|
| 23 local set = require"util.set"; | 23 local set = require"util.set"; |
| 24 local dns_lookup = require"net.adns".lookup; | 24 local dns_lookup = require"net.adns".lookup; |
| 25 local hashes = require"util.hashes"; | 25 local hashes = require"util.hashes"; |
| 26 local base64 = require"util.encodings".base64; | 26 local base64 = require"util.encodings".base64; |
| 27 local idna_to_ascii = require "util.encodings".idna.to_ascii; | 27 local idna_to_ascii = require "util.encodings".idna.to_ascii; |
| 28 | |
| 29 if not dns_lookup.types or not dns_lookup.types.TLSA then | |
| 30 module:log("error", "No TLSA support available, DANE will not be supported"); | |
| 31 return | |
| 32 end | |
| 28 | 33 |
| 29 local s2sout = module:depends"s2s".route_to_new_session.s2sout; | 34 local s2sout = module:depends"s2s".route_to_new_session.s2sout; |
| 30 | 35 |
| 31 local pat = "%-%-%-%-%-BEGIN ([A-Z ]+)%-%-%-%-%-\r?\n".. | 36 local pat = "%-%-%-%-%-BEGIN ([A-Z ]+)%-%-%-%-%-\r?\n".. |
| 32 "([0-9A-Za-z=+/\r\n]*)\r?\n%-%-%-%-%-END %1%-%-%-%-%-"; | 37 "([0-9A-Za-z=+/\r\n]*)\r?\n%-%-%-%-%-END %1%-%-%-%-%-"; |
