starttls
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -45,6 +45,8 @@ /** | ||
if (socket.readable) { | ||
// In Node < 0.9.0, socket.readable is undefined. | ||
if (socket.readable || undefined === socket.readable) { | ||
return startTls(options, onSecure); | ||
} | ||
// In Node > 0.9.0, if the socket is still unconnected then wait for connect. | ||
socket.once('connect', function() { | ||
@@ -51,0 +53,0 @@ startTls(options, onSecure); |
{ | ||
"name": "starttls", | ||
"description": "Upgrade a regular `net.Stream` connection to a secure `tls` connection.", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "lib/starttls.js", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/mattcg/starttls", |
# Start TLS # | ||
[![Build Status](https://travis-ci.org/mattcg/starttls.png?branch=master)](https://travis-ci.org/mattcg/starttls) | ||
Upgrade a regular [`net.Stream`](http://nodejs.org/api/net.html#net_class_net_socket) connection to a secure [`tls`](http://nodejs.org/api/tls.html) connection. | ||
Based on a version by [Andris Reinman](https://github.com/andris9/rai/blob/master/lib/starttls.js), itself based on an older version by [Nathan Rajlich](https://gist.github.com/TooTallNate/848444). | ||
Based on code by [Andris Reinman](https://github.com/andris9/rai/blob/master/lib/starttls.js), itself based on an older version by [Nathan Rajlich](https://gist.github.com/TooTallNate/848444). | ||
@@ -7,0 +9,0 @@ ## Usage ## |
10524
7
220
76