Re: [nodejs] Upgrading a socket to TLS in node v0.8.25

2013-08-17 Thread Nathan Rajlich
I'm not entirely sure when support for this API was introduced, but this works fine in my code on v0.8.25: // create regular TCP connection var socket = net.connect({ host: 'google.com', port: 443 }); // upgrade to TLS socket = tls.connect({ socket: socket,

[nodejs] Upgrading a socket to TLS in node v0.8.25

2013-08-16 Thread Kris Reeves
I found this: http://stackoverflow.com/questions/11399986/how-can-i-upgrade-a-socket-to-tls-in-node which gave me this: https://github.com/andris9/rai/blob/master/lib/starttls.js which perfectly solved my problem, except I ran into this: https://github.com/joyent/node/issues/5140 which I

Re: [nodejs] Upgrading a socket to TLS in node v0.8.25

2013-08-16 Thread Matt
You could try the code that Haraka uses - I had to get it working on 0.4-0.10 so I can promise it works across the board. https://github.com/baudehlo/Haraka/blob/master/tls_socket.js On Fri, Aug 16, 2013 at 12:59 AM, Kris Reeves myn...@gmail.com wrote: I found this:

Re: [nodejs] Upgrading a socket to TLS in node v0.8.25

2013-08-16 Thread Kris Reeves
Oh, cool; I'll give it a whirl. I do believe the code I borrowed should work on 0.4-0.10 as well though, so I think it must be a problem elsewhere in my code or in the way I'm using it. I just can't figure out what exactly is happening on 0.10 that isn't happening on 0.8... On Friday, August