+24
-9
@@ -200,2 +200,3 @@ var libc = require("./lib/c.js"); | ||
| assert.optionalString(params.password, "password"); | ||
| assert.optionalObject(params.ca, "params.ca"); | ||
| assert.optionalBool(params.socketNoDelay, "params.socketNoDelay"); | ||
@@ -224,10 +225,23 @@ assert.optionalNumber(params.socketTimeout, "params.socketTimeout"); | ||
| }; | ||
| var socketArgs = []; | ||
| if (params.unixSocket) { | ||
| socketArgs.push(params.unixSocket); | ||
| var socketArgs; | ||
| if (params.useTLS) { | ||
| socketArgs = {}; | ||
| if (params.unixSocket) { | ||
| socketArgs.path = params.unixSocket; | ||
| } else { | ||
| socketArgs.port = params.port; | ||
| socketArgs.host = params.host; | ||
| socketArgs.ca = params.ca; | ||
| } | ||
| } else { | ||
| socketArgs = []; | ||
| if (params.unixSocket) { | ||
| socketArgs.push(params.unixSocket); | ||
| } | ||
| else { | ||
| socketArgs.push(params.port, params.host); | ||
| } | ||
| } | ||
| else { | ||
| socketArgs.push(params.port, params.host); | ||
| } | ||
| socketArgs.push(function() { | ||
| var connectionCBfunc = function() { | ||
| socket.removeListener("error", errorcb); | ||
@@ -248,7 +262,8 @@ if (error === false) { | ||
| } | ||
| }); | ||
| }; | ||
| if (params.useTLS) { | ||
| socket = tls.connect.apply(null, socketArgs); | ||
| socket = tls.connect(socketArgs, connectionCBfunc); | ||
| } else { | ||
| socketArgs.push(connectionCBfunc); | ||
| socket = net.connect.apply(null, socketArgs); | ||
@@ -255,0 +270,0 @@ } |
+1
-1
| { | ||
| "name": "node-q", | ||
| "version": "2.6.1", | ||
| "version": "2.7.0", | ||
| "description": "Q interfacing with Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+1
-0
@@ -285,2 +285,3 @@ # node-q | ||
| * `useTLS`: Boolean (optional) | ||
| * `ca`: Buffer | String (e.g. fs.readFileSync('path\\to\\cert.pem')) (optional) | ||
| * `socketNoDelay` : Boolean (optional, see http://nodejs.org/api/net.html#net_socket_setnodelay_nodelay) | ||
@@ -287,0 +288,0 @@ * `socketTimeout`: Number (optional, see http://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
175026
0.25%4716
0.3%391
0.26%