xmpp/starttls_test.go -rw-r--r-- 5.6 KiB
internal/stream: remove s2s bool from stream send

Previously we set the namespace depending on whether a server-to-server
value was set. However, the namespace is set in the stream and may be
other values (such as the Jabber Component namespace) as well, so just
leave this alone and let the negotiator handle it.

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp: make STARTTLS always required

TLS (or at the time, SSL) may have been an optional feature in the past,
but it's not anymore. These days it's far more likely that a server will
always want to require TLS in some form, so giving the user the ability
to turn it off just means we're giving users who won't understand the
consequences of their actions a knob to twiddle. In the very rare case
that a user actually *does* need STARTTLS to be an optional stream
feature, I don't think it's something we should support. For this rare
use case, they'll have to take the maintenance burden on themselves by
copy/pasting the StartTLS feature code and tweaking it for their needs.

Fixes #50

Signed-off-by: Sam Whited <sam@samwhited.com>
xmpp, xmpp/sasl2: improve test error handling

Also fixes several ineffectual assignments in test files.
all: add new API to make reading tokens safer
all: unexport and simplify Conn type
all: update copyright message

[ci skip]
xmpp: improve starttls test output
all: always wrap ReadWriter's in a Conn
xmpp: remove TLSConfig from Config

See #38
internal/ns: move ns package to internal/ns
Session should not close the underlying Conn
More session cleanup
Add Session API and remove Conn
Fix tests broken by change in encoder flushing
Change stream features list API to use xml encoder

Fixes #11
Allow features to upgrade the underlying RWC

Fixes #9
Separate state bits for input/output stream closed
ns: Move namespaces to own package

This lets us prevent import loops (eg. if we want to access namespace
constants from a sibling tree under xmpp/)
Add more tests

Add test of adding features to a config
Add test of stanza error interface
Add a StartTLS negotiate tests
Remove copy/pasted comment