agl/xmpp — pull request #5 by dotdotdotpaul (2012-09-29 21:28:36+00:00)
Title: Obey TrustedAddress config option when negotiating TLS

We'd set up an ejabberd server with a self-signed cert for tinkering with/testing against, and I found that the lib wouldn't connect even when I had TrustedAddress turned on. This version creates a tls.Config object and uses TrustedAddress' value to set InsecureSkipVerify (which skips verifying the cert) and then I skip the whole VerifiedChains inspection in this case as well. Solved my problem. Does not change the behavior of any client that hasn't set TrustedAddress. Admittedly skirts some security elements, but if you're setting TrustedAddress, you're probably okay with those ramifications.