Commit 769837b
committed
Force SNI to be the --xmpphost if passed
XMPP can be used with SNI in two contexts:
- Standard RFC 6120 STARTTLS-based connections; in that case, SNI
is most likely to be ignored, as XMPP uses another way to signal
the target domain name (via the @to attribute on the stream
header, which is already set correctly by testssl.sh). However,
setting SNI to a different value than the @to attribute may
lead to confusion.
- XEP-0368 (XMPP-over-TLS) connections which omit the STARTTLS
phase and go right for TLS (and inside that, XMPP). In that case,
SNI is obviously required to be correct. XEP-0368 specifies that
the SNI name MUST be the domain name of the service (not
necessarily the host name of the endpoint, thanks to SRV
records).
Hence, this patch forces the SNI name to be the --xmpphost value,
if --xmpphost is given. Note that it blatantly ignores whether
XMPP is used otherwise.1 parent b4c9437 commit 769837b
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4522 | 4522 | | |
4523 | 4523 | | |
4524 | 4524 | | |
| 4525 | + | |
4525 | 4526 | | |
4526 | | - | |
| 4527 | + | |
4527 | 4528 | | |
4528 | | - | |
| 4529 | + | |
4529 | 4530 | | |
4530 | 4531 | | |
4531 | 4532 | | |
| |||
14514 | 14515 | | |
14515 | 14516 | | |
14516 | 14517 | | |
14517 | | - | |
| 14518 | + | |
| 14519 | + | |
14518 | 14520 | | |
14519 | | - | |
| 14521 | + | |
14520 | 14522 | | |
14521 | 14523 | | |
14522 | 14524 | | |
| |||
19710 | 19712 | | |
19711 | 19713 | | |
19712 | 19714 | | |
19713 | | - | |
| 19715 | + | |
| 19716 | + | |
| 19717 | + | |
| 19718 | + | |
| 19719 | + | |
| 19720 | + | |
19714 | 19721 | | |
19715 | 19722 | | |
19716 | 19723 | | |
| |||
0 commit comments