Create a gist now

Instantly share code, notes, and snippets.

Using Hubot and the hubot-xmpp adapter, I wasn't able to connect to a corp Jabber server running Openfire 3.6.4, with a seemingly different SSL configuration than the stock Openfire one. The node-xmpp client would simply hang after receiving the stanza "<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>". I've seen several other posts from users…
* Perform TLS handshake using node's newer tls.connect() and forcing SSLv3
* Fixes client hanging while trying to connect on some Openfire XMPP configurations
var crypto = require('crypto');
var tls = require('tls');
module.exports = function starttls(socket, credentials, isServer, cb) {
// TLS handshake
var cleartext = tls.connect({socket:socket, rejectUnauthorized:false, secureProtocol:'SSLv3_method'}, function() {
cleartext.authorized = true;
if (cb) cb();
cleartext._controlReleased = true;
return cleartext;

Can you make a pull request and add this to the under a heading of "Openfire Issues?"? Would really appreciate that. If you don't have time, comment back and will add myself. Thanks!


@lloydwatkin I'm hesitant to pull the trigger too soon in case it breaks handshaking in other circumstances. Should we have more users test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment