If connecting fails because of a TLS error, the error message is quite unhelpful: magnus.henoch@example.com/nil: connection lost: `nil'
In the process buffer (see jabber-debug-keep-process-buffers) there is more information:
- The hostname in the certificate does NOT match 'example.com'
jabber.el should present this information to the user. (This might involve changes to Emacs)