freedomjs/freedom-for-firefox — pull request #12 by dborkan (2014-08-11 23:58:00+00:00)
Title: Add secure method to tcp socket for firefox

Adding a secure method to tcp socket for firefox.

Firefox sockets can be upgraded to TLS using by calling nsISocketTransportService.createTransport with type 'starttls' and the same hostname and port as an existing insecure tcp socket. Documentation is here: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsISocketTransportService#createTransport()

I've tested this in my own firefox addon and am able to log into Facebook XMPP using the starttls flow and get my friends list, however I'm not sure how to update the tests in freedom-for-firefox (they already have 1 failure, and when I add my own test that I try to intentionally make fail I don't get a 2nd error).