Kim Alvefur
c460117e3c
core.portmanager: Fix traceback on attempt to get non-existent service
...
If there's no such interface:port then `data` is nil and `data.service`
errors.
4 years ago
Kim Alvefur
cf5c477c8f
core.portmanager: Also reload per-SNI certificates
5 years ago
Kim Alvefur
b665846031
core.portmanager: Reload direct TLS certificates after config reload
...
This should re-create all contexts the same way as when the service was
activated, which reloads certificates.
5 years ago
Kim Alvefur
cdb0bff7d2
core.portmanager: Factor out base TLS context creation for reuse
...
Thinking I can use this to reload certificates after config reload
5 years ago
Kim Alvefur
01c869407d
core.portmanager: Fix race condition in initialization of SNI cert map
...
Under some circumstances when hosts and modules are loaded in some
certain order, entries end up missing from the SNI map. This manifests
in e.g. `curl https://localhost:5281/ ` giving an error about
"unrecognized name".
The `service` argument is `nil` when invoked from the "host-activated"
event, leading it to iterating over every service. And then it would not
be fetching e.g. `http_host` from the config, which explains why https
would sometimes not work due to the missing name entry.
Because when `service` is included, this limits the iteration to
matching entries, while also returning the same value as the `name` loop
variable. Because `name == service when service != nil` we can use name
instead in the body of the loop.
5 years ago
Kim Alvefur
4cd3fcfb0b
core.portmanager: Use existing http_host for https SNI mapping
5 years ago
Kim Alvefur
10fc065796
core.portmanager: Allow overriding expected SNI name per service
...
E.g.
VirtualHost"example.com"
https_name = "xmpp.example.com"
5 years ago
Kim Alvefur
f638628c08
core.portmanager: Log SNI hosts, services looked for
...
To highlight how many these are
5 years ago
Matthew Wild
e4f830812f
portmanager: Don't auto-start network services under prosodyctl
6 years ago
Kim Alvefur
c4c6a44c30
core.portmanager: Ignore unused return variable [luacheck]
6 years ago
Kim Alvefur
4614213216
core.portmanager: Complete error message for SNI TLS context problems
6 years ago
Kim Alvefur
1f33d9c6bb
core.portmanager: Fix TLS context inheritance for SNI hosts (completes SNI support)
6 years ago
Kim Alvefur
b65b591c7a
core.portmanager: Don't set the first TLS context with a cert as main context
...
Don't think this works and it's apparently acceptable to require SNI these days.
6 years ago
Kim Alvefur
06cf2e641a
core.portmanager: Log debug message for each kind of TLS context created
7 years ago
Kim Alvefur
e3276738b3
core.portmanager: Remove unused local [luacheck]
7 years ago
Kim Alvefur
73beabd065
core.portmanager: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
8 years ago
Kim Alvefur
1ecc3a7918
core: Split some very long lines [luacheck]
9 years ago
Kim Alvefur
47fb0705f6
portmanager: Set default read size back to 4K
10 years ago
Kim Alvefur
14d035cf43
core: Increase default read size to "all of it", in practice 8K (size of LuaSockets buffer)
10 years ago
Kim Alvefur
2458f50dca
portmanager: Lower the priority of module-supplied TLS options
10 years ago
Matthew Wild
b925d6f580
portmanager: Remove unused argument from function [luacheck]
11 years ago
Matthew Wild
36c0cf5d9d
portmanager: Rename variable to avoid name conflict [luacheck]
11 years ago
Matthew Wild
4e5f5c41ae
portmanager: Add luacheck annotations
11 years ago
Matthew Wild
7b3df2bae6
portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
11 years ago
Kim Alvefur
db2152e888
portmanager: Add forward declarations
11 years ago
Kim Alvefur
27265c20e2
core.*: Remove use of module() function
11 years ago
Matthew Wild
322aa3c9c3
portmanager: Remove unused import of pairs()
11 years ago
Kim Alvefur
c24bed529f
core.portmanager: Simplify and take advantage of new ssl config merging in certmanager
12 years ago
Matthew Wild
5273af7c22
portmanager: Make maximum read size configurable, and default to 4KB
12 years ago
Florian Zeitz
1d833bb807
Remove all trailing whitespace
13 years ago
Kim Alvefur
99c908e11a
portmanager: Also include the interface the service is listening on
13 years ago
Waqas Hussain
372de588be
portmanager: Include port numbers the service is listening on in the info logs.
13 years ago
Matthew Wild
4624a05183
portmanager: import pairs() (thanks Maranda)
13 years ago
Marco Cirillo
7cd207a8f6
portmanager: add logic to allow specification of service default values for ssl config and / or overrides.
13 years ago
Matthew Wild
3e788bfa6e
portmanager: Log error and fail to bind when port is invalid (not a number)
13 years ago
Kim Alvefur
077cfbe8a4
portmanager: Add use_ipv4 option, default to true.
13 years ago
Kim Alvefur
45fa794da0
portmanager: use_ipv6 defaults to true if luasocket has ipv6 support
13 years ago
Kim Alvefur
9f39499470
portmanager: Make sure foo_ports is a table
13 years ago
Matthew Wild
193b00e1ff
portmanager: Return first service with the specified name from get_service() (instead of the array of possible services) (thanks xnyhps)
13 years ago
Matthew Wild
c6fcddc614
portmanager: Support 'local_interfaces' config option (default for private listeners like components, telnet, etc.) (thanks mva)
14 years ago
Kim Alvefur
2878ed99a5
core.portmanager: Collect per-host certificates for SNI
7 years ago
Kim Alvefur
5313a0c5c6
core.portmanager: Record TLS config for each port
7 years ago
Kim Alvefur
59f517457b
core.portmanager: Reduce scope of variable
...
Not sure why it was all the way out there, seems like there would have
been unexpected behaviour from that
7 years ago
Kim Alvefur
781d8a4868
core.portmanager: Use server.listen API
7 years ago
Matthew Wild
30f0c3a465
portmanager: Remove unused import of 'pairs'
14 years ago
Kim Alvefur
fe4e7ec80f
portmanager: Show a friendly error message when initializing SSL fails (thanks MattJ for the entire patch that I fixed one line in)
14 years ago
Matthew Wild
c7f054eae6
portmanager: Match service against service_info (:iter() doesn't match values)
14 years ago
Matthew Wild
b402b8f4ae
portmanager: Fix to deactivate services when they are unregistered (metatable:iter() wins)
14 years ago
Matthew Wild
bf452927fd
portmanager: Fix missing variable declaration
14 years ago