diff --git a/node_modules/tunnel/.idea/encodings.xml b/node_modules/tunnel/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/node_modules/tunnel/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/node_modules/tunnel/.idea/modules.xml b/node_modules/tunnel/.idea/modules.xml
new file mode 100644
index 0000000..27bf888
--- /dev/null
+++ b/node_modules/tunnel/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/node_modules/tunnel/.idea/node-tunnel.iml b/node_modules/tunnel/.idea/node-tunnel.iml
new file mode 100644
index 0000000..24643cc
--- /dev/null
+++ b/node_modules/tunnel/.idea/node-tunnel.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/node_modules/tunnel/.idea/vcs.xml b/node_modules/tunnel/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/node_modules/tunnel/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/node_modules/tunnel/.idea/workspace.xml b/node_modules/tunnel/.idea/workspace.xml
new file mode 100644
index 0000000..1a318c8
--- /dev/null
+++ b/node_modules/tunnel/.idea/workspace.xml
@@ -0,0 +1,797 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ max
+ onconne
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+ false
+ false
+ true
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project
+
+
+ true
+
+
+
+ DIRECTORY
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ 1497256565348
+
+
+ 1497256565348
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/node_modules/tunnel/.npmignore b/node_modules/tunnel/.npmignore
deleted file mode 100644
index 6684c76..0000000
--- a/node_modules/tunnel/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/.idea
-/node_modules
diff --git a/node_modules/tunnel/.travis.yml b/node_modules/tunnel/.travis.yml
new file mode 100644
index 0000000..cb6e182
--- /dev/null
+++ b/node_modules/tunnel/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - "4"
+ - "6"
+ - "8"
+ - "10"
diff --git a/node_modules/tunnel/CHANGELOG.md b/node_modules/tunnel/CHANGELOG.md
index 70bdbd7..baf6b18 100644
--- a/node_modules/tunnel/CHANGELOG.md
+++ b/node_modules/tunnel/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+ - 0.0.6 (2018/09/11)
+ - Fix `localAddress` not working (#25)
+ - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30)
+ - Fix default port for https (#32)
+ - Fix error handling when the proxy send illegal response body (#33)
+
+ - 0.0.5 (2017/06/12)
+ - Fix socket leak.
+
- 0.0.4 (2016/01/23)
- supported Node v0.12 or later.
diff --git a/node_modules/tunnel/README.md b/node_modules/tunnel/README.md
index b196162..f54bca5 100644
--- a/node_modules/tunnel/README.md
+++ b/node_modules/tunnel/README.md
@@ -1,5 +1,9 @@
# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
+[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel)
+[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies)
+[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies)
+
## Example
```javascript
@@ -29,7 +33,7 @@ var req = https.request({
```javascript
var tunnelingAgent = tunnel.httpOverHttp({
- maxSockets: poolSize, // Defaults to 5
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
@@ -57,7 +61,7 @@ var req = http.request({
```javascript
var tunnelingAgent = tunnel.httpsOverHttp({
- maxSockets: poolSize, // Defaults to 5
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
// CA for origin server if necessary
ca: [ fs.readFileSync('origin-server-ca.pem')],
@@ -92,7 +96,7 @@ var req = https.request({
```javascript
var tunnelingAgent = tunnel.httpOverHttps({
- maxSockets: poolSize, // Defaults to 5
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
proxy: { // Proxy settings
host: proxyHost, // Defaults to 'localhost'
@@ -130,7 +134,7 @@ var req = http.request({
```javascript
var tunnelingAgent = tunnel.httpsOverHttps({
- maxSockets: poolSize, // Defaults to 5
+ maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
// CA for origin server if necessary
ca: [ fs.readFileSync('origin-server-ca.pem')],
@@ -173,6 +177,8 @@ var req = https.request({
## CONTRIBUTORS
* [Aleksis Brezas (abresas)](https://github.com/abresas)
+* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian)
+* [Dmitry Sorin (1999)](https://github.com/1999)
## License
diff --git a/node_modules/tunnel/lib/tunnel.js b/node_modules/tunnel/lib/tunnel.js
index c42b039..10cc382 100644
--- a/node_modules/tunnel/lib/tunnel.js
+++ b/node_modules/tunnel/lib/tunnel.js
@@ -25,6 +25,7 @@ function httpsOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
return agent;
}
@@ -38,6 +39,7 @@ function httpsOverHttps(options) {
var agent = new TunnelingAgent(options);
agent.request = https.request;
agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
return agent;
}
@@ -106,8 +108,14 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
var connectOptions = mergeOptions({}, self.proxyOptions, {
method: 'CONNECT',
path: options.host + ':' + options.port,
- agent: false
+ agent: false,
+ headers: {
+ host: options.host + ':' + options.port
+ }
});
+ if (options.localAddress) {
+ connectOptions.localAddress = options.localAddress;
+ }
if (connectOptions.proxyAuth) {
connectOptions.headers = connectOptions.headers || {};
connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
@@ -139,20 +147,29 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
connectReq.removeAllListeners();
socket.removeAllListeners();
- if (res.statusCode === 200) {
- assert.equal(head.length, 0);
- debug('tunneling connection has established');
- self.sockets[self.sockets.indexOf(placeholder)] = socket;
- cb(socket);
- } else {
+ if (res.statusCode !== 200) {
debug('tunneling socket could not be established, statusCode=%d',
- res.statusCode);
+ res.statusCode);
+ socket.destroy();
var error = new Error('tunneling socket could not be established, ' +
- 'statusCode=' + res.statusCode);
+ 'statusCode=' + res.statusCode);
error.code = 'ECONNRESET';
options.request.emit('error', error);
self.removeSocket(placeholder);
+ return;
}
+ if (head.length > 0) {
+ debug('got illegal response body from proxy');
+ socket.destroy();
+ var error = new Error('got illegal response body from proxy');
+ error.code = 'ECONNRESET';
+ options.request.emit('error', error);
+ self.removeSocket(placeholder);
+ return;
+ }
+ debug('tunneling connection has established');
+ self.sockets[self.sockets.indexOf(placeholder)] = socket;
+ return cb(socket);
}
function onError(cause) {
diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json
index a77f0df..c539011 100644
--- a/node_modules/tunnel/package.json
+++ b/node_modules/tunnel/package.json
@@ -1,31 +1,31 @@
{
"_args": [
[
- "tunnel@0.0.4",
+ "tunnel@0.0.6",
"/home/runner/work/ghaction-upx/ghaction-upx"
]
],
- "_from": "tunnel@0.0.4",
- "_id": "tunnel@0.0.4",
+ "_from": "tunnel@0.0.6",
+ "_id": "tunnel@0.0.6",
"_inBundle": false,
- "_integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=",
+ "_integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"_location": "/tunnel",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "tunnel@0.0.4",
+ "raw": "tunnel@0.0.6",
"name": "tunnel",
"escapedName": "tunnel",
- "rawSpec": "0.0.4",
+ "rawSpec": "0.0.6",
"saveSpec": null,
- "fetchSpec": "0.0.4"
+ "fetchSpec": "0.0.6"
},
"_requiredBy": [
"/typed-rest-client"
],
- "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
- "_spec": "0.0.4",
+ "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+ "_spec": "0.0.6",
"_where": "/home/runner/work/ghaction-upx/ghaction-upx",
"author": {
"name": "Koichi Kobayashi",
@@ -36,8 +36,8 @@
},
"description": "Node HTTP/HTTPS Agents for tunneling proxies",
"devDependencies": {
- "mocha": "*",
- "should": "*"
+ "mocha": "^5.2.0",
+ "should": "^13.2.3"
},
"directories": {
"lib": "./lib"
@@ -61,7 +61,7 @@
"url": "git+https://github.com/koichik/node-tunnel.git"
},
"scripts": {
- "test": "./node_modules/mocha/bin/mocha"
+ "test": "mocha"
},
- "version": "0.0.4"
+ "version": "0.0.6"
}
diff --git a/node_modules/tunnel/test/http-over-http.js b/node_modules/tunnel/test/http-over-http.js
deleted file mode 100644
index 73d17a2..0000000
--- a/node_modules/tunnel/test/http-over-http.js
+++ /dev/null
@@ -1,108 +0,0 @@
-var http = require('http');
-var net = require('net');
-var should = require('should');
-var tunnel = require('../index');
-
-describe('HTTP over HTTP', function() {
- it('should finish without error', function(done) {
- var serverPort = 3000;
- var proxyPort = 3001;
- var poolSize = 3;
- var N = 10;
- var serverConnect = 0;
- var proxyConnect = 0;
- var clientConnect = 0;
- var server;
- var proxy;
- var agent;
-
- server = http.createServer(function(req, res) {
- tunnel.debug('SERVER: got request');
- ++serverConnect;
- res.writeHead(200);
- res.end('Hello' + req.url);
- tunnel.debug('SERVER: sending response');
- });
- server.listen(serverPort, setupProxy);
-
- function setupProxy() {
- proxy = http.createServer(function(req, res) {
- should.fail();
- });
- proxy.on('upgrade', onConnect); // for v0.6
- proxy.on('connect', onConnect); // for v0.7 or later
-
- function onConnect(req, clientSocket, head) {
- tunnel.debug('PROXY: got CONNECT request');
-
- req.method.should.equal('CONNECT');
- req.url.should.equal('localhost:' + serverPort);
- req.headers.should.not.have.property('transfer-encoding');
- req.headers.should.have.property('proxy-authorization',
- 'Basic ' + new Buffer('user:password').toString('base64'));
- ++proxyConnect;
-
- tunnel.debug('PROXY: creating a tunnel');
- var serverSocket = net.connect(serverPort, function() {
- tunnel.debug('PROXY: replying to client CONNECT request');
- clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
- clientSocket.pipe(serverSocket);
- serverSocket.write(head);
- serverSocket.pipe(clientSocket);
- // workaround, see joyent/node#2524
- serverSocket.on('end', function() {
- clientSocket.end();
- });
- });
- }
- proxy.listen(proxyPort, setupClient);
- }
-
- function setupClient() {
- agent = tunnel.httpOverHttp({
- maxSockets: poolSize,
- proxy: {
- port: proxyPort,
- proxyAuth: 'user:password'
- }
- });
-
- for (var i = 0; i < N; ++i) {
- doClientRequest(i);
- }
-
- function doClientRequest(i) {
- tunnel.debug('CLIENT: Making HTTP request (%d)', i);
- var req = http.get({
- port: serverPort,
- path: '/' + i,
- agent: agent
- }, function(res) {
- tunnel.debug('CLIENT: got HTTP response (%d)', i);
- res.setEncoding('utf8');
- res.on('data', function(data) {
- data.should.equal('Hello/' + i);
- });
- res.on('end', function() {
- ++clientConnect;
- if (clientConnect === N) {
- proxy.close();
- server.close();
- }
- });
- });
- }
- }
-
- server.on('close', function() {
- serverConnect.should.equal(N);
- proxyConnect.should.equal(poolSize);
- clientConnect.should.equal(N);
-
- agent.sockets.should.be.empty;
- agent.requests.should.be.empty;
-
- done();
- });
- });
-});
diff --git a/node_modules/tunnel/test/http-over-https.js b/node_modules/tunnel/test/http-over-https.js
deleted file mode 100644
index c3a92fd..0000000
--- a/node_modules/tunnel/test/http-over-https.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var http = require('http');
-var https = require('https');
-var net = require('net');
-var fs = require('fs');
-var path = require('path');
-var should = require('should');
-var tunnel = require('../index');
-
-function readPem(file) {
- return fs.readFileSync(path.join('test/keys', file + '.pem'));
-}
-
-var proxyKey = readPem('proxy1-key');
-var proxyCert = readPem('proxy1-cert');
-var proxyCA = readPem('ca2-cert');
-var clientKey = readPem('client1-key');
-var clientCert = readPem('client1-cert');
-var clientCA = readPem('ca3-cert');
-
-describe('HTTP over HTTPS', function() {
- it('should finish without error', function(done) {
- var serverPort = 3004;
- var proxyPort = 3005;
- var poolSize = 3;
- var N = 10;
- var serverConnect = 0;
- var proxyConnect = 0;
- var clientConnect = 0;
- var server;
- var proxy;
- var agent;
-
- server = http.createServer(function(req, res) {
- tunnel.debug('SERVER: got request');
- ++serverConnect;
- res.writeHead(200);
- res.end('Hello' + req.url);
- tunnel.debug('SERVER: sending response');
- });
- server.listen(serverPort, setupProxy);
-
- function setupProxy() {
- proxy = https.createServer({
- key: proxyKey,
- cert: proxyCert,
- ca: [clientCA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- should.fail();
- });
- proxy.on('upgrade', onConnect); // for v0.6
- proxy.on('connect', onConnect); // for v0.7 or later
-
- function onConnect(req, clientSocket, head) {
- tunnel.debug('PROXY: got CONNECT request');
-
- req.method.should.equal('CONNECT');
- req.url.should.equal('localhost:' + serverPort);
- req.headers.should.not.have.property('transfer-encoding');
- ++proxyConnect;
-
- tunnel.debug('PROXY: creating a tunnel');
- var serverSocket = net.connect(serverPort, function() {
- tunnel.debug('PROXY: replying to client CONNECT request');
- clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
- clientSocket.pipe(serverSocket);
- serverSocket.write(head);
- serverSocket.pipe(clientSocket);
- // workaround, see joyent/node#2524
- serverSocket.on('end', function() {
- clientSocket.end();
- });
- });
- }
- proxy.listen(proxyPort, setupClient);
- }
-
- function setupClient() {
- agent = tunnel.httpOverHttps({
- maxSockets: poolSize,
- proxy: {
- port: proxyPort,
- key: clientKey,
- cert: clientCert,
- ca: [proxyCA],
- rejectUnauthorized: true
- }
- });
-
- for (var i = 0; i < N; ++i) {
- doClientRequest(i);
- }
-
- function doClientRequest(i) {
- tunnel.debug('CLIENT: Making HTTP request (%d)', i);
- var req = http.get({
- port: serverPort,
- path: '/' + i,
- agent: agent
- }, function(res) {
- tunnel.debug('CLIENT: got HTTP response (%d)', i);
- res.setEncoding('utf8');
- res.on('data', function(data) {
- data.should.equal('Hello/' + i);
- });
- res.on('end', function() {
- ++clientConnect;
- if (clientConnect === N) {
- proxy.close();
- server.close();
- }
- });
- });
- }
- }
-
- server.on('close', function() {
- serverConnect.should.equal(N);
- proxyConnect.should.equal(poolSize);
- clientConnect.should.equal(N);
-
- var name = 'localhost:' + serverPort;
- agent.sockets.should.be.empty;
- agent.requests.should.be.empty;
-
- done();
- });
- });
-});
diff --git a/node_modules/tunnel/test/https-over-http.js b/node_modules/tunnel/test/https-over-http.js
deleted file mode 100644
index 82c4772..0000000
--- a/node_modules/tunnel/test/https-over-http.js
+++ /dev/null
@@ -1,130 +0,0 @@
-var http = require('http');
-var https = require('https');
-var net = require('net');
-var fs = require('fs');
-var path = require('path');
-var should = require('should');
-var tunnel = require('../index');
-
-function readPem(file) {
- return fs.readFileSync(path.join('test/keys', file + '.pem'));
-}
-
-var serverKey = readPem('server1-key');
-var serverCert = readPem('server1-cert');
-var serverCA = readPem('ca1-cert');
-var clientKey = readPem('client1-key');
-var clientCert = readPem('client1-cert');
-var clientCA = readPem('ca3-cert');
-
-
-describe('HTTPS over HTTP', function() {
- it('should finish without error', function(done) {
- var serverPort = 3002;
- var proxyPort = 3003;
- var poolSize = 3;
- var N = 10;
- var serverConnect = 0;
- var proxyConnect = 0;
- var clientConnect = 0;
- var server;
- var proxy;
- var agent;
-
- server = https.createServer({
- key: serverKey,
- cert: serverCert,
- ca: [clientCA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- tunnel.debug('SERVER: got request');
- ++serverConnect;
- res.writeHead(200);
- res.end('Hello' + req.url);
- tunnel.debug('SERVER: sending response');
- });
- server.listen(serverPort, setupProxy);
-
- function setupProxy() {
- proxy = http.createServer(function(req, res) {
- should.fail();
- });
- proxy.on('upgrade', onConnect); // for v0.6
- proxy.on('connect', onConnect); // for v0.7 or later
-
- function onConnect(req, clientSocket, head) {
- tunnel.debug('PROXY: got CONNECT request');
-
- req.method.should.equal('CONNECT');
- req.url.should.equal('localhost:' + serverPort);
- req.headers.should.not.have.property('transfer-encoding');
- ++proxyConnect;
-
- var serverSocket = net.connect(serverPort, function() {
- tunnel.debug('PROXY: replying to client CONNECT request');
- clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
- clientSocket.pipe(serverSocket);
- serverSocket.write(head);
- serverSocket.pipe(clientSocket);
- // workaround, see joyent/node#2524
- serverSocket.on('end', function() {
- clientSocket.end();
- });
- });
- }
- proxy.listen(proxyPort, setupClient);
- }
-
- function setupClient() {
- agent = tunnel.httpsOverHttp({
- maxSockets: poolSize,
- key: clientKey,
- cert: clientCert,
- ca: [serverCA],
- rejectUnauthorized: true,
- proxy: {
- port: proxyPort
- }
- });
-
- for (var i = 0; i < N; ++i) {
- doClientRequest(i);
- }
-
- function doClientRequest(i) {
- tunnel.debug('CLIENT: Making HTTPS request (%d)', i);
- var req = https.get({
- port: serverPort,
- path: '/' + i,
- agent: agent
- }, function(res) {
- tunnel.debug('CLIENT: got HTTPS response (%d)', i);
- res.setEncoding('utf8');
- res.on('data', function(data) {
- data.should.equal('Hello/' + i);
- });
- res.on('end', function() {
- ++clientConnect;
- if (clientConnect === N) {
- proxy.close();
- server.close();
- }
- });
- });
- }
- }
-
- server.on('close', function() {
- serverConnect.should.equal(N);
- proxyConnect.should.equal(poolSize);
- clientConnect.should.equal(N);
-
- var name = 'localhost:' + serverPort;
- agent.sockets.should.be.empty;
- agent.requests.should.be.empty;
-
- done();
- });
- });
-});
diff --git a/node_modules/tunnel/test/https-over-https-error.js b/node_modules/tunnel/test/https-over-https-error.js
deleted file mode 100644
index c74094d..0000000
--- a/node_modules/tunnel/test/https-over-https-error.js
+++ /dev/null
@@ -1,261 +0,0 @@
-var http = require('http');
-var https = require('https');
-var net = require('net');
-var fs = require('fs');
-var path = require('path');
-var should = require('should');
-var tunnel = require('../index');
-
-function readPem(file) {
- return fs.readFileSync(path.join('test/keys', file + '.pem'));
-}
-
-var serverKey = readPem('server2-key');
-var serverCert = readPem('server2-cert');
-var serverCA = readPem('ca1-cert');
-var proxyKey = readPem('proxy2-key');
-var proxyCert = readPem('proxy2-cert');
-var proxyCA = readPem('ca2-cert');
-var client1Key = readPem('client1-key');
-var client1Cert = readPem('client1-cert');
-var client1CA = readPem('ca3-cert');
-var client2Key = readPem('client2-key');
-var client2Cert = readPem('client2-cert');
-var client2CA = readPem('ca4-cert');
-
-describe('HTTPS over HTTPS authentication failed', function() {
- it('should finish without error', function(done) {
- var serverPort = 3008;
- var proxyPort = 3009;
- var serverConnect = 0;
- var proxyConnect = 0;
- var clientRequest = 0;
- var clientConnect = 0;
- var clientError = 0;
- var server;
- var proxy;
-
- server = https.createServer({
- key: serverKey,
- cert: serverCert,
- ca: [client1CA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- tunnel.debug('SERVER: got request', req.url);
- ++serverConnect;
- req.on('data', function(data) {
- });
- req.on('end', function() {
- res.writeHead(200);
- res.end('Hello, ' + serverConnect);
- tunnel.debug('SERVER: sending response');
- });
- req.resume();
- });
- //server.addContext('server2', {
- // key: serverKey,
- // cert: serverCert,
- // ca: [client1CA],
- //});
- server.listen(serverPort, setupProxy);
-
- function setupProxy() {
- proxy = https.createServer({
- key: proxyKey,
- cert: proxyCert,
- ca: [client2CA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- should.fail();
- });
- //proxy.addContext('proxy2', {
- // key: proxyKey,
- // cert: proxyCert,
- // ca: [client2CA],
- //});
- proxy.on('upgrade', onConnect); // for v0.6
- proxy.on('connect', onConnect); // for v0.7 or later
-
- function onConnect(req, clientSocket, head) {
- req.method.should.equal('CONNECT');
- req.url.should.equal('localhost:' + serverPort);
- req.headers.should.not.have.property('transfer-encoding');
- ++proxyConnect;
-
- var serverSocket = net.connect(serverPort, function() {
- tunnel.debug('PROXY: replying to client CONNECT request');
- clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
- clientSocket.pipe(serverSocket);
- serverSocket.write(head);
- serverSocket.pipe(clientSocket);
- // workaround, see #2524
- serverSocket.on('end', function() {
- clientSocket.end();
- });
- });
- }
- proxy.listen(proxyPort, setupClient);
- }
-
- function setupClient() {
- function doRequest(name, options, host) {
- tunnel.debug('CLIENT: Making HTTPS request (%s)', name);
- ++clientRequest;
- var agent = tunnel.httpsOverHttps(options);
- var req = https.get({
- host: 'localhost',
- port: serverPort,
- path: '/' + encodeURIComponent(name),
- headers: {
- host: host ? host : 'localhost',
- },
- rejectUnauthorized: true,
- agent: agent
- }, function(res) {
- tunnel.debug('CLIENT: got HTTPS response (%s)', name);
- ++clientConnect;
- res.on('data', function(data) {
- });
- res.on('end', function() {
- req.emit('finish');
- });
- res.resume();
- });
- req.on('error', function(err) {
- tunnel.debug('CLIENT: failed HTTP response (%s)', name, err);
- ++clientError;
- req.emit('finish');
- });
- req.on('finish', function() {
- if (clientConnect + clientError === clientRequest) {
- proxy.close();
- server.close();
- }
- });
- }
-
- doRequest('no cert origin nor proxy', { // invalid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // no certificate for origin server
- proxy: {
- port: proxyPort,
- ca: [proxyCA],
- rejectUnauthorized: true,
- headers: {
- host: 'proxy2'
- }
- // no certificate for proxy
- }
- }, 'server2');
-
- doRequest('no cert proxy', { // invalid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // client certification for origin server
- key: client1Key,
- cert: client1Cert,
- proxy: {
- port: proxyPort,
- ca: [proxyCA],
- rejectUnauthorized: true,
- headers: {
- host: 'proxy2'
- }
- // no certificate for proxy
- }
- }, 'server2');
-
- doRequest('no cert origin', { // invalid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // no certificate for origin server
- proxy: {
- port: proxyPort,
- servername: 'proxy2',
- ca: [proxyCA],
- rejectUnauthorized: true,
- headers: {
- host: 'proxy2'
- },
- // client certification for proxy
- key: client2Key,
- cert: client2Cert
- }
- }, 'server2');
-
- doRequest('invalid proxy server name', { // invalid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // client certification for origin server
- key: client1Key,
- cert: client1Cert,
- proxy: {
- port: proxyPort,
- ca: [proxyCA],
- rejectUnauthorized: true,
- // client certification for proxy
- key: client2Key,
- cert: client2Cert,
- }
- }, 'server2');
-
- doRequest('invalid origin server name', { // invalid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // client certification for origin server
- key: client1Key,
- cert: client1Cert,
- proxy: {
- port: proxyPort,
- servername: 'proxy2',
- ca: [proxyCA],
- rejectUnauthorized: true,
- headers: {
- host: 'proxy2'
- },
- // client certification for proxy
- key: client2Key,
- cert: client2Cert
- }
- });
-
- doRequest('valid', { // valid
- maxSockets: 1,
- ca: [serverCA],
- rejectUnauthorized: true,
- // client certification for origin server
- key: client1Key,
- cert: client1Cert,
- proxy: {
- port: proxyPort,
- servername: 'proxy2',
- ca: [proxyCA],
- rejectUnauthorized: true,
- headers: {
- host: 'proxy2'
- },
- // client certification for proxy
- key: client2Key,
- cert: client2Cert
- }
- }, 'server2');
- }
-
- server.on('close', function() {
- serverConnect.should.equal(1);
- proxyConnect.should.equal(3);
- clientConnect.should.equal(1);
- clientError.should.equal(5);
-
- done();
- });
- });
-});
diff --git a/node_modules/tunnel/test/https-over-https.js b/node_modules/tunnel/test/https-over-https.js
deleted file mode 100644
index a9f81c8..0000000
--- a/node_modules/tunnel/test/https-over-https.js
+++ /dev/null
@@ -1,146 +0,0 @@
-var http = require('http');
-var https = require('https');
-var net = require('net');
-var fs = require('fs');
-var path = require('path');
-var should = require('should');
-var tunnel = require('../index.js');
-
-function readPem(file) {
- return fs.readFileSync(path.join('test/keys', file + '.pem'));
-}
-
-var serverKey = readPem('server1-key');
-var serverCert = readPem('server1-cert');
-var serverCA = readPem('ca1-cert');
-var proxyKey = readPem('proxy1-key');
-var proxyCert = readPem('proxy1-cert');
-var proxyCA = readPem('ca2-cert');
-var client1Key = readPem('client1-key');
-var client1Cert = readPem('client1-cert');
-var client1CA = readPem('ca3-cert');
-var client2Key = readPem('client2-key');
-var client2Cert = readPem('client2-cert');
-var client2CA = readPem('ca4-cert');
-
-describe('HTTPS over HTTPS', function() {
- it('should finish without error', function(done) {
- var serverPort = 3006;
- var proxyPort = 3007;
- var poolSize = 3;
- var N = 5;
- var serverConnect = 0;
- var proxyConnect = 0;
- var clientConnect = 0;
- var server;
- var proxy;
- var agent;
-
- server = https.createServer({
- key: serverKey,
- cert: serverCert,
- ca: [client1CA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- tunnel.debug('SERVER: got request');
- ++serverConnect;
- res.writeHead(200);
- res.end('Hello' + req.url);
- tunnel.debug('SERVER: sending response');
- });
- server.listen(serverPort, setupProxy);
-
- function setupProxy() {
- proxy = https.createServer({
- key: proxyKey,
- cert: proxyCert,
- ca: [client2CA],
- requestCert: true,
- rejectUnauthorized: true
- }, function(req, res) {
- should.fail();
- });
- proxy.on('upgrade', onConnect); // for v0.6
- proxy.on('connect', onConnect); // for v0.7 or later
-
- function onConnect(req, clientSocket, head) {
- tunnel.debug('PROXY: got CONNECT request');
- req.method.should.equal('CONNECT');
- req.url.should.equal('localhost:' + serverPort);
- req.headers.should.not.have.property('transfer-encoding');
- ++proxyConnect;
-
- var serverSocket = net.connect(serverPort, function() {
- tunnel.debug('PROXY: replying to client CONNECT request');
- clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n');
- clientSocket.pipe(serverSocket);
- serverSocket.write(head);
- serverSocket.pipe(clientSocket);
- // workaround, see joyent/node#2524
- serverSocket.on('end', function() {
- clientSocket.end();
- });
- });
- }
- proxy.listen(proxyPort, setupClient);
- }
-
- function setupClient() {
- agent = tunnel.httpsOverHttps({
- maxSockets: poolSize,
- // client certification for origin server
- key: client1Key,
- cert: client1Cert,
- ca: [serverCA],
- rejectUnauthroized: true,
- proxy: {
- port: proxyPort,
- // client certification for proxy
- key: client2Key,
- cert: client2Cert,
- ca: [proxyCA],
- rejectUnauthroized: true
- }
- });
-
- for (var i = 0; i < N; ++i) {
- doClientRequest(i);
- }
-
- function doClientRequest(i) {
- tunnel.debug('CLIENT: Making HTTPS request (%d)', i);
- var req = https.get({
- port: serverPort,
- path: '/' + i,
- agent: agent
- }, function(res) {
- tunnel.debug('CLIENT: got HTTPS response (%d)', i);
- res.setEncoding('utf8');
- res.on('data', function(data) {
- data.should.equal('Hello/' + i);
- });
- res.on('end', function() {
- ++clientConnect;
- if (clientConnect === N) {
- proxy.close();
- server.close();
- }
- });
- });
- }
- }
-
- server.on('close', function() {
- serverConnect.should.equal(N);
- proxyConnect.should.equal(poolSize);
- clientConnect.should.equal(N);
-
- var name = 'localhost:' + serverPort;
- agent.sockets.should.be.empty;
- agent.requests.should.be.empty;
-
- done();
- });
- });
-});
diff --git a/node_modules/tunnel/test/keys/Makefile b/node_modules/tunnel/test/keys/Makefile
deleted file mode 100644
index 6b4745b..0000000
--- a/node_modules/tunnel/test/keys/Makefile
+++ /dev/null
@@ -1,157 +0,0 @@
-all: server1-cert.pem server2-cert.pem proxy1-cert.pem proxy2-cert.pem client1-cert.pem client2-cert.pem
-
-
-#
-# Create Certificate Authority: ca1
-# ('password' is used for the CA password.)
-#
-ca1-cert.pem: ca1.cnf
- openssl req -new -x509 -days 9999 -config ca1.cnf -keyout ca1-key.pem -out ca1-cert.pem
-
-#
-# Create Certificate Authority: ca2
-# ('password' is used for the CA password.)
-#
-ca2-cert.pem: ca2.cnf
- openssl req -new -x509 -days 9999 -config ca2.cnf -keyout ca2-key.pem -out ca2-cert.pem
-
-#
-# Create Certificate Authority: ca3
-# ('password' is used for the CA password.)
-#
-ca3-cert.pem: ca3.cnf
- openssl req -new -x509 -days 9999 -config ca3.cnf -keyout ca3-key.pem -out ca3-cert.pem
-
-#
-# Create Certificate Authority: ca4
-# ('password' is used for the CA password.)
-#
-ca4-cert.pem: ca4.cnf
- openssl req -new -x509 -days 9999 -config ca4.cnf -keyout ca4-key.pem -out ca4-cert.pem
-
-
-#
-# server1 is signed by ca1.
-#
-server1-key.pem:
- openssl genrsa -out server1-key.pem 1024
-
-server1-csr.pem: server1.cnf server1-key.pem
- openssl req -new -config server1.cnf -key server1-key.pem -out server1-csr.pem
-
-server1-cert.pem: server1-csr.pem ca1-cert.pem ca1-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in server1-csr.pem \
- -CA ca1-cert.pem \
- -CAkey ca1-key.pem \
- -CAcreateserial \
- -out server1-cert.pem
-
-#
-# server2 is signed by ca1.
-#
-server2-key.pem:
- openssl genrsa -out server2-key.pem 1024
-
-server2-csr.pem: server2.cnf server2-key.pem
- openssl req -new -config server2.cnf -key server2-key.pem -out server2-csr.pem
-
-server2-cert.pem: server2-csr.pem ca1-cert.pem ca1-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in server2-csr.pem \
- -CA ca1-cert.pem \
- -CAkey ca1-key.pem \
- -CAcreateserial \
- -out server2-cert.pem
-
-server2-verify: server2-cert.pem ca1-cert.pem
- openssl verify -CAfile ca1-cert.pem server2-cert.pem
-
-#
-# proxy1 is signed by ca2.
-#
-proxy1-key.pem:
- openssl genrsa -out proxy1-key.pem 1024
-
-proxy1-csr.pem: proxy1.cnf proxy1-key.pem
- openssl req -new -config proxy1.cnf -key proxy1-key.pem -out proxy1-csr.pem
-
-proxy1-cert.pem: proxy1-csr.pem ca2-cert.pem ca2-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in proxy1-csr.pem \
- -CA ca2-cert.pem \
- -CAkey ca2-key.pem \
- -CAcreateserial \
- -out proxy1-cert.pem
-
-#
-# proxy2 is signed by ca2.
-#
-proxy2-key.pem:
- openssl genrsa -out proxy2-key.pem 1024
-
-proxy2-csr.pem: proxy2.cnf proxy2-key.pem
- openssl req -new -config proxy2.cnf -key proxy2-key.pem -out proxy2-csr.pem
-
-proxy2-cert.pem: proxy2-csr.pem ca2-cert.pem ca2-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in proxy2-csr.pem \
- -CA ca2-cert.pem \
- -CAkey ca2-key.pem \
- -CAcreateserial \
- -out proxy2-cert.pem
-
-proxy2-verify: proxy2-cert.pem ca2-cert.pem
- openssl verify -CAfile ca2-cert.pem proxy2-cert.pem
-
-#
-# client1 is signed by ca3.
-#
-client1-key.pem:
- openssl genrsa -out client1-key.pem 1024
-
-client1-csr.pem: client1.cnf client1-key.pem
- openssl req -new -config client1.cnf -key client1-key.pem -out client1-csr.pem
-
-client1-cert.pem: client1-csr.pem ca3-cert.pem ca3-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in client1-csr.pem \
- -CA ca3-cert.pem \
- -CAkey ca3-key.pem \
- -CAcreateserial \
- -out client1-cert.pem
-
-#
-# client2 is signed by ca4.
-#
-client2-key.pem:
- openssl genrsa -out client2-key.pem 1024
-
-client2-csr.pem: client2.cnf client2-key.pem
- openssl req -new -config client2.cnf -key client2-key.pem -out client2-csr.pem
-
-client2-cert.pem: client2-csr.pem ca4-cert.pem ca4-key.pem
- openssl x509 -req \
- -days 9999 \
- -passin "pass:password" \
- -in client2-csr.pem \
- -CA ca4-cert.pem \
- -CAkey ca4-key.pem \
- -CAcreateserial \
- -out client2-cert.pem
-
-
-clean:
- rm -f *.pem *.srl
-
-test: client-verify server2-verify proxy1-verify proxy2-verify client-verify
diff --git a/node_modules/tunnel/test/keys/agent1-cert.pem b/node_modules/tunnel/test/keys/agent1-cert.pem
deleted file mode 100644
index 816f6fb..0000000
--- a/node_modules/tunnel/test/keys/agent1-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKjCCAZMCCQDQ8o4kHKdCPDANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
-UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
-BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA
-dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
-MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
-EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G
-CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
-ADBIAkEAnzpAqcoXZxWJz/WFK7BXwD23jlREyG11x7gkydteHvn6PrVBbB5yfu6c
-bk8w3/Ar608AcyMQ9vHjkLQKH7cjEQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAKha
-HqjCfTIut+m/idKy3AoFh48tBHo3p9Nl5uBjQJmahKdZAaiksL24Pl+NzPQ8LIU+
-FyDHFp6OeJKN6HzZ72Bh9wpBVu6Uj1hwhZhincyTXT80wtSI/BoUAW8Ls2kwPdus
-64LsJhhxqj2m4vPKNRbHB2QxnNrGi30CUf3kt3Ia
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/agent1-csr.pem b/node_modules/tunnel/test/keys/agent1-csr.pem
deleted file mode 100644
index 748fd00..0000000
--- a/node_modules/tunnel/test/keys/agent1-csr.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
-EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
-EwZhZ2VudDExIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
-KoZIhvcNAQEBBQADSwAwSAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnb
-Xh75+j61QWwecn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAaAlMCMGCSqG
-SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
-AF+AfG64hNyYHum46m6i7RgnUBrJSOynGjs23TekV4he3QdMSAAPPqbll8W14+y3
-vOo7/yQ2v2uTqxCjakUNPPs=
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/agent1-key.pem b/node_modules/tunnel/test/keys/agent1-key.pem
deleted file mode 100644
index 5dae7eb..0000000
--- a/node_modules/tunnel/test/keys/agent1-key.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOwIBAAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnbXh75+j61QWwe
-cn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAQJBAI2cU1IuR+4IO87WPyAB
-76kruoo87AeNQkjjvuQ/00+b/6IS45mcEP5Kw0NukbqBhIw2di9uQ9J51DJ/ZfQr
-+YECIQDUHaN3ZjIdJ7/w8Yq9Zzz+3kY2F/xEz6e4ftOFW8bY2QIhAMAref+WYckC
-oECgOLAvAxB1lI4j7oCbAaawfxKdnPj5AiEAi95rXx09aGpAsBGmSdScrPdG1v6j
-83/2ebrvoZ1uFqkCIB0AssnrRVjUB6GZTNTyU3ERfdkx/RX1zvr8WkFR/lXpAiB7
-cUZ1i8ZkZrPrdVgw2cb28UJM7qZHQnXcMHTXFFvxeQ==
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/agent1.cnf b/node_modules/tunnel/test/keys/agent1.cnf
deleted file mode 100644
index 81d2f09..0000000
--- a/node_modules/tunnel/test/keys/agent1.cnf
+++ /dev/null
@@ -1,19 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = US
-ST = CA
-L = SF
-O = Joyent
-OU = Node.js
-CN = agent1
-emailAddress = ry@tinyclouds.org
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/agent2-cert.pem b/node_modules/tunnel/test/keys/agent2-cert.pem
deleted file mode 100644
index 8e4354d..0000000
--- a/node_modules/tunnel/test/keys/agent2-cert.pem
+++ /dev/null
@@ -1,13 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV
-UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
-BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR
-cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy
-WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD
-VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg
-MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF
-AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC
-WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA
-C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9
-1LHwrmh29rK8kBPEjmymCQ==
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/agent2-csr.pem b/node_modules/tunnel/test/keys/agent2-csr.pem
deleted file mode 100644
index a670c4c..0000000
--- a/node_modules/tunnel/test/keys/agent2-csr.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
-EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
-EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
-KoZIhvcNAQEBBQADSwAwSAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf
-+6fVgdpVhYg5QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAaAlMCMGCSqG
-SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
-AJnll2pt5l0pzskQSpjjLVTlFDFmJr/AZ3UK8v0WxBjYjCe5Jx4YehkChpxIyDUm
-U3J9q9MDUf0+Y2+EGkssFfk=
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/agent2-key.pem b/node_modules/tunnel/test/keys/agent2-key.pem
deleted file mode 100644
index 522903c..0000000
--- a/node_modules/tunnel/test/keys/agent2-key.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5
-QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH
-9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p
-OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf
-WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb
-AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa
-cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/agent2.cnf b/node_modules/tunnel/test/keys/agent2.cnf
deleted file mode 100644
index 0a9f2c7..0000000
--- a/node_modules/tunnel/test/keys/agent2.cnf
+++ /dev/null
@@ -1,19 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = US
-ST = CA
-L = SF
-O = Joyent
-OU = Node.js
-CN = agent2
-emailAddress = ry@tinyclouds.org
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/agent3-cert.pem b/node_modules/tunnel/test/keys/agent3-cert.pem
deleted file mode 100644
index e4a2350..0000000
--- a/node_modules/tunnel/test/keys/agent3-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKjCCAZMCCQCDBr594bsJmTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
-UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
-BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlA
-dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9
-MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
-EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MzEgMB4G
-CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL
-ADBIAkEAtlNDZ+bHeBI0B2gD/IWqA7Aq1hwsnS4+XpnLesjTQcL2JwFFpkR0oWrw
-yjrYhCogi7c5gjKrLZF1d2JD5JgHgQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAJoK
-bXwsImk7vJz9649yrmsXwnuGbEKVYMvqcGyjaZNP9lYEG41y5CeRzxhWy2rlYdhE
-f2nqE2lg75oJP7LQqfQY7aCqwahM3q/GQbsfKVCGjF7TVyq9TQzd8iW+FEJIQzSE
-3aN85hR67+3VAXeSzmkGSVBO2m1SJIug4qftIkc2
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/agent3-csr.pem b/node_modules/tunnel/test/keys/agent3-csr.pem
deleted file mode 100644
index e6c0c74..0000000
--- a/node_modules/tunnel/test/keys/agent3-csr.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
-EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
-EwZhZ2VudDMxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
-KoZIhvcNAQEBBQADSwAwSAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI
-00HC9icBRaZEdKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAaAlMCMGCSqG
-SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
-AEGo76iH+a8pnE+RWQT+wg9/BL+iIuqrcFXLs0rbGonqderrwXAe15ODwql/Bfu3
-zgMt8ooTsgMPcMX9EgmubEM=
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/agent3-key.pem b/node_modules/tunnel/test/keys/agent3-key.pem
deleted file mode 100644
index d72f071..0000000
--- a/node_modules/tunnel/test/keys/agent3-key.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOwIBAAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI00HC9icBRaZE
-dKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAQJAIk+G9s2SKgFa8y3a2jGZ
-LfqABSzmJGooaIsOpLuYLd6eCC31XUDlT4rPVGRhysKQCQ4+NMjgdnj9ZqNnvXY/
-RQIhAOgbdltr3Ey2hy7RuDW5rmOeJTuVqCrZ7QI8ifyCEbYTAiEAyRfvWSvvASeP
-kZTMUhATRUpuyDQW+058NE0oJSinTpsCIQCR/FPhBGI3TcaQyA9Ym0T4GwvIAkUX
-TqInefRAAX8qSQIgZVJPAdIWGbHSL9sWW97HpukLCorcbYEtKbkamiZyrjMCIQCX
-lX76ttkeId5OsJGQcF67eFMMr2UGZ1WMf6M39lCYHQ==
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/agent3.cnf b/node_modules/tunnel/test/keys/agent3.cnf
deleted file mode 100644
index 26db5ba..0000000
--- a/node_modules/tunnel/test/keys/agent3.cnf
+++ /dev/null
@@ -1,19 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = US
-ST = CA
-L = SF
-O = Joyent
-OU = Node.js
-CN = agent3
-emailAddress = ry@tinyclouds.org
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/agent4-cert.pem b/node_modules/tunnel/test/keys/agent4-cert.pem
deleted file mode 100644
index 07157b9..0000000
--- a/node_modules/tunnel/test/keys/agent4-cert.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICSDCCAbGgAwIBAgIJAIMGvn3huwmaMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV
-BAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoTBkpveWVu
-dDEQMA4GA1UECxMHTm9kZS5qczEMMAoGA1UEAxMDY2EyMSAwHgYJKoZIhvcNAQkB
-FhFyeUB0aW55Y2xvdWRzLm9yZzAeFw0xMTAzMTQxODI5MTJaFw0zODA3MjkxODI5
-MTJaMH0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzAN
-BgNVBAoTBkpveWVudDEQMA4GA1UECxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQ0
-MSAwHgYJKoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzBcMA0GCSqGSIb3DQEB
-AQUAA0sAMEgCQQDN/yMfmQ8zdvmjlGk7b3Mn6wY2FjaMb4c5ENJX15vyYhKS1zhx
-6n0kQIn2vf6yqG7tO5Okz2IJiD9Sa06mK6GrAgMBAAGjFzAVMBMGA1UdJQQMMAoG
-CCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAA8FXpRmdrHBdlofNvxa14zLvv0N
-WnUGUmxVklFLKXvpVWTanOhVgI2TDCMrT5WvCRTD25iT1EUKWxjDhFJrklQJ+IfC
-KC6fsgO7AynuxWSfSkc8/acGiAH+20vW9QxR53HYiIDMXEV/wnE0KVcr3t/d70lr
-ImanTrunagV+3O4O
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/agent4-csr.pem b/node_modules/tunnel/test/keys/agent4-csr.pem
deleted file mode 100644
index 97e115d..0000000
--- a/node_modules/tunnel/test/keys/agent4-csr.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH
-EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD
-EwZhZ2VudDQxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ
-KoZIhvcNAQEBBQADSwAwSAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfX
-m/JiEpLXOHHqfSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAaAlMCMGCSqG
-SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB
-AMzo7GUOBtGm5MSck1rrEE2C1bU3qoVvXVuiN3A/57zXeNeq24FZMLnkDeL9U+/b
-Kj646XFou04gla982Xp74p0=
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/agent4-key.pem b/node_modules/tunnel/test/keys/agent4-key.pem
deleted file mode 100644
index b770b01..0000000
--- a/node_modules/tunnel/test/keys/agent4-key.pem
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIBOQIBAAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfXm/JiEpLXOHHq
-fSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAQJAN8RQb+dx1A7rejtdWbfM
-Rww7PD07Oz2eL/a72wgFsdIabRuVypIoHunqV0sAegYtNJt9yu+VhREw0R5tx/qz
-EQIhAPY+nmzp0b4iFRk7mtGUmCTr9iwwzoqzITwphE7FpQnFAiEA1ihUHFT9YPHO
-f85skM6qZv77NEgXHO8NJmQZ5GX1ZK8CICzle+Mluo0tD6W7HV4q9pZ8wzSJbY8S
-W/PpKetm09F1AiAWTw8sAGKAtc/IGo3Oq+iuYAN1F8lolzJsfGMCGujsOwIgAJKP
-t3eXilwX3ZlsDWSklWNZ7iYcfYrvAc3JqU6gFCE=
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/agent4.cnf b/node_modules/tunnel/test/keys/agent4.cnf
deleted file mode 100644
index 5e583eb..0000000
--- a/node_modules/tunnel/test/keys/agent4.cnf
+++ /dev/null
@@ -1,21 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = US
-ST = CA
-L = SF
-O = Joyent
-OU = Node.js
-CN = agent4
-emailAddress = ry@tinyclouds.org
-
-[ req_attributes ]
-challengePassword = A challenge password
-
-[ ext_key_usage ]
-extendedKeyUsage = clientAuth
diff --git a/node_modules/tunnel/test/keys/ca1-cert.pem b/node_modules/tunnel/test/keys/ca1-cert.pem
deleted file mode 100644
index 640c084..0000000
--- a/node_modules/tunnel/test/keys/ca1-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICIzCCAYwCCQC4ONZJx5BOwjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
-CgYDVQQDEwNjYTExJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
-anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOJMS1ug8jUu0wwEfD4h9/Mg
-w0fvs7JbpMxtwpdcFpg/6ECd8YzGUvljLzeHPe2AhF26MiWIUN3YTxZRiQQ2tv93
-afRVWchdPypytmuxv2aYGjhZ66Tv4vNRizM71OE+66+KS30gEQW2k4MTr0ZVlRPR
-OVey+zRSLdVaKciB/XaBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEApfbly4b+Ry1q
-bGIgGrlTvNFvF+j2RuHqSpuTB4nKyw1tbNreKmEEb6SBEfkjcTONx5rKECZ5RRPX
-z4R/o1G6Dn21ouf1pWQO0BC/HnLN30KvvsoZRoxBn/fqBlJA+j/Kpj3RQgFj6l2I
-AKI5fD+ucPqRGhjmmTsNyc+Ln4UfAq8=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/ca1-cert.srl b/node_modules/tunnel/test/keys/ca1-cert.srl
deleted file mode 100644
index d7f4b79..0000000
--- a/node_modules/tunnel/test/keys/ca1-cert.srl
+++ /dev/null
@@ -1 +0,0 @@
-B111C9CEF0257692
diff --git a/node_modules/tunnel/test/keys/ca1-key.pem b/node_modules/tunnel/test/keys/ca1-key.pem
deleted file mode 100644
index aaa58ae..0000000
--- a/node_modules/tunnel/test/keys/ca1-key.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN ENCRYPTED PRIVATE KEY-----
-MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIbo5wvG42IY0CAggA
-MBQGCCqGSIb3DQMHBAgf8SPuz4biYASCAoAR4r8MVikusOAEt4Xp6nB7whrMX4iG
-G792Qpf21nHZPMV73w3cdkfimbAfUn8F50tSJwdrAa8U9BjjpL9Kt0loIyXt/r8c
-6PWAQ4WZuLPgTFUTJUNAXrunBHI0iFWYEN4YzJYmT1qN3J4u0diy0MkKz6eJPfZ3
-3v97+nF7dR2H86ZgLKsuE4pO5IRb60XW85d7CYaY6rU6l6mXMF0g9sIccHTlFoet
-Xm6cA7NAm1XSI1ciYcoc8oaVE9dXoOALaTnBEZ2MJGpsYQ0Hr7kB4VKAO9wsOta5
-L9nXPv79Nzo1MZMChkrORFnwOzH4ffsUwVQ70jUzkt5DEyzCM1oSxFNRQESxnFrr
-7c1jLg2gxAVwnqYo8njsKJ23BZqZUxHsBgB2Mg1L/iPT6zhclD0u3RZx9MR4ezB2
-IqoCF19Z5bblkReAeVRAE9Ol4hKVaCEIIPUspcw7eGVGONalHDCSXpIFnJoZLeXJ
-OZjLmYlA6KkJw52eNE5IwIb8l/tha2fwNpRvlMoXp65yH9wKyJk8zPSM6WAk4dKD
-nLrTCK4KtM6aIbG14Mff6WEf3uaLPM0cLwxmuypfieCZfkIzgytNdFZoBgaYUpon
-zazvUMoy3gqDBorcU08SaosdRoL+s+QVkRhA29shf42lqOM4zbh0dTul4QDlLG0U
-VBNeMJ3HnrqATfBU28j3bUqtuF2RffgcN/3ivlBjcyzF/iPt0TWmm6Zz5v4K8+b6
-lOm6gofIz+ffg2cXfPzrqZ2/xhFkcerRuN0Xp5eAhlI2vGJVGuEc4X+tT7VtQgLV
-iovqzlLhp+ph/gsfCcsYZ9iso3ozw+Cx1HfJ8XT7yWUgXxblkt4uszEo
------END ENCRYPTED PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/ca1.cnf b/node_modules/tunnel/test/keys/ca1.cnf
deleted file mode 100644
index dcb0637..0000000
--- a/node_modules/tunnel/test/keys/ca1.cnf
+++ /dev/null
@@ -1,17 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-output_password = password
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = ca1
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/ca2-cert.pem b/node_modules/tunnel/test/keys/ca2-cert.pem
deleted file mode 100644
index 4c29c87..0000000
--- a/node_modules/tunnel/test/keys/ca2-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICIzCCAYwCCQCxIhZSDET+8DANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
-CgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
-anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaaLMMe7K5eYABH3NnJoimG
-LvY4S5tdGF6YRwfkn1bgGa+kEw1zNqa/Y0jSzs4h7bApt3+bKTalR4+Zk+0UmWgZ
-Gvlq8+mdqDXtBKoWE3vYDPBmeNyKsgxf9UIhFOpsxVUeYP8t66qJyUk/FlFJcDqc
-WPawikl1bUFSZXBKu4PxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAwh3sXPIkA5kn
-fpg7fV5haS4EpFr9ia61dzWbhXDZtasAx+nWdWqgG4T+HIYSLlMNZbGJ998uhFZf
-DEHlbY/WuSBukZ0w+xqKBtPyjLIQKVvNiaTx5YMzQes62R1iklOXzBzyHbYIxFOG
-dqLfIjEe/mVVoR23LN2tr8Wa6+rmd+w=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/ca2-cert.srl b/node_modules/tunnel/test/keys/ca2-cert.srl
deleted file mode 100644
index 2749952..0000000
--- a/node_modules/tunnel/test/keys/ca2-cert.srl
+++ /dev/null
@@ -1 +0,0 @@
-9BF2D4B2E00EDF16
diff --git a/node_modules/tunnel/test/keys/ca2-crl.pem b/node_modules/tunnel/test/keys/ca2-crl.pem
deleted file mode 100644
index 166df74..0000000
--- a/node_modules/tunnel/test/keys/ca2-crl.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN X509 CRL-----
-MIIBXTCBxzANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJVUzELMAkGA1UECBMC
-Q0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUu
-anMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5v
-cmcXDTExMDMxNDE4MjkxNloXDTEzMTIwNzE4MjkxNlowHDAaAgkAgwa+feG7CZoX
-DTExMDMxNDE4MjkxNFowDQYJKoZIhvcNAQEEBQADgYEArRKuEkOla61fm4zlZtHe
-LTXFV0Hgo21PScHAp6JqPol4rN5R9+EmUkv7gPCVVBJ9VjIgxSosHiLsDiz3zR+u
-txHemhzbdIVANAIiChnFct8sEqH2eL4N6XNUIlMIR06NjNl7NbN8w8haqiearnuT
-wmnaL4TThPmpbpKAF7N7JqQ=
------END X509 CRL-----
diff --git a/node_modules/tunnel/test/keys/ca2-database.txt b/node_modules/tunnel/test/keys/ca2-database.txt
deleted file mode 100644
index a0966d2..0000000
--- a/node_modules/tunnel/test/keys/ca2-database.txt
+++ /dev/null
@@ -1 +0,0 @@
-R 380729182912Z 110314182914Z 8306BE7DE1BB099A unknown /C=US/ST=CA/L=SF/O=Joyent/OU=Node.js/CN=agent4/emailAddress=ry@tinyclouds.org
diff --git a/node_modules/tunnel/test/keys/ca2-key.pem b/node_modules/tunnel/test/keys/ca2-key.pem
deleted file mode 100644
index 9cea659..0000000
--- a/node_modules/tunnel/test/keys/ca2-key.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN ENCRYPTED PRIVATE KEY-----
-MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI3aq9fKZIOF0CAggA
-MBQGCCqGSIb3DQMHBAjyunMfVve0OwSCAoAdMsrRFlQUSILw+bq3cSVIIbFjwcs0
-B1Uz2rc9SB+1qjsazjv4zvPQSXTrsx2EOSJf9PSPz7r+c0NzO9vfWLorpXof/lwL
-C1tRN7/1OqEW/mTK+1wlv0M5C4cmf44BBXmI+y+RWrQ/qc+CWEMvfHwv9zWr2K+i
-cLlZv55727GvZYCMMVLiqYd/Ejj98loBsE5dhN4JJ5MPaN3UHhFTCpD453GIIzCi
-FRuYhOOtX4qYoEuP2db4S2qu26723ZJnYBEHkK2YZiRrgvoZHugyGIr4f/RRoSUI
-fPgycgQfL3Ow+Y1G533PiZ+CYgh9cViUzhZImEPiZpSuUntAD1loOYkJuV9Ai9XZ
-+t6+7tfkM3aAo1bkaU8KcfINxxNWfAhCbUQw+tGJl2A+73OM5AGjGSfzjQQL/FOa
-5omfEvdfEX2XyRRlqnQ2VucvSTL9ZdzbIJGg/euJTpM44Fwc7yAZv2aprbPoPixu
-yyf0LoTjlGGSBZvHkunpWx82lYEXvHhcnCxV5MDFw8wehvDrvcSuzb8//HzLOiOB
-gzUr3DOQk4U1UD6xixZjAKC+NUwTVZoHg68KtmQfkq+eGUWf5oJP4xUigi3ui/Wy
-OCBDdlRBkFtgLGL51KJqtq1ixx3Q9HMl0y6edr5Ls0unDIo0LtUWUUcAtr6wl+kK
-zSztxFMi2zTtbhbkwoVpucNstFQNfV1k22vtnlcux2FV2DdZiJQwYpIbr8Gj6gpK
-gtV5l9RFe21oZBcKPt/chrF8ayiClfGMpF3D2p2GqGCe0HuH5uM/JAFf60rbnriA
-Nu1bWiXsXLRUXcLIQ/uEPR3Mvvo9k1h4Q6it1Rp67eQiXCX6h2uFq+sB
------END ENCRYPTED PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/ca2-serial b/node_modules/tunnel/test/keys/ca2-serial
deleted file mode 100644
index 8a0f05e..0000000
--- a/node_modules/tunnel/test/keys/ca2-serial
+++ /dev/null
@@ -1 +0,0 @@
-01
diff --git a/node_modules/tunnel/test/keys/ca2.cnf b/node_modules/tunnel/test/keys/ca2.cnf
deleted file mode 100644
index 46e8274..0000000
--- a/node_modules/tunnel/test/keys/ca2.cnf
+++ /dev/null
@@ -1,17 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-output_password = password
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = ca2
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/ca3-cert.pem b/node_modules/tunnel/test/keys/ca3-cert.pem
deleted file mode 100644
index 02b3f7a..0000000
--- a/node_modules/tunnel/test/keys/ca3-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICIzCCAYwCCQCudHFhEWiUHDANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
-CgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
-anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJPRJMhCNtxX6dQ3rLdrzVCl
-XJMSRIICpbsc7arOzSJcrsIYeYC4d29dGwxYNLnAkKSmHujFT9SmFgh88CoYETLp
-gE9zCk9hVCwUlWelM/UaIrzeLT4SC3VBptnLmMtk2mqFniLcaFdMycAcX8OIhAgG
-fbqyT5Wxwz7UMegip2ZjAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADpu8a/W+NPnS
-mhyIOxXn8O//2oH9ELlBYFLIgTid0xmS05x/MgkXtWqiBEEZFoOfoJBJxM3vTFs0
-PiZvcVjv0IIjDF4s54yRVH+4WI2p7cil1fgzAVRTuOIuR+VyN7ct8s26a/7GFDq6
-NJMByyjsJHyxwwri5hVv+jbLCxmnDjI=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/ca3-cert.srl b/node_modules/tunnel/test/keys/ca3-cert.srl
deleted file mode 100644
index cfd39e1..0000000
--- a/node_modules/tunnel/test/keys/ca3-cert.srl
+++ /dev/null
@@ -1 +0,0 @@
-EF7B2CF0FA61DF41
diff --git a/node_modules/tunnel/test/keys/ca3-key.pem b/node_modules/tunnel/test/keys/ca3-key.pem
deleted file mode 100644
index 8931132..0000000
--- a/node_modules/tunnel/test/keys/ca3-key.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN ENCRYPTED PRIVATE KEY-----
-MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIwAta+L4c9soCAggA
-MBQGCCqGSIb3DQMHBAgqRud2p3SvogSCAoDXoDJOJDkvgFpQ6rxeV5r0fLX4SrGJ
-quv4yt02QxSDUPN2ZLtBt6bLzg4Zv2pIggufYJcZ2IOUnX82T7FlvBP8hbW1q3Bs
-jAso7z8kJlFrZjNudjuP2l/X8tjrVyr3I0PoRoomtcHnCcSDdyne8Dqqj1enuikF
-8b7FZUqocNLfu8LmNGxMmMwjw3UqhtpP5DjqV60B8ytQFPoz/gFh6aNGvsrD/avU
-Dj8EJkQZP6Q32vmCzAvSiLjk7FA7RFmBtaurE9hJYNlc5v1eo69EUwPkeVlTpglJ
-5sZAHxlhQCgc72ST6uFQKiMO3ng/JJA5N9EvacYSHQvI1TQIo43V2A//zUh/5hGL
-sDv4pRuFq9miX8iiQpwo1LDfRzdwg7+tiLm8/mDyeLUSzDNc6GIX/tC9R4Ukq4ge
-1Cfq0gtKSRxZhM8HqpGBC9rDs5mpdUqTRsoHLFn5T6/gMiAtrLCJxgD8JsZBa8rM
-KZ09QEdZXTvpyvZ8bSakP5PF6Yz3QYO32CakL7LDPpCng0QDNHG10YaZbTOgJIzQ
-NJ5o87DkgDx0Bb3L8FoREIBkjpYFbQi2fvPthoepZ3D5VamVsOwOiZ2sR1WF2J8l
-X9c8GdG38byO+SQIPNZ8eT5JvUcNeSlIZiVSwvaEk496d2KzhmMMfoBLFVeHXG90
-CIZPleVfkTmgNQgXPWcFngqTZdDEGsHjEDDhbEAijB3EeOxyiiEDJPMy5zqkdy5D
-cZ/Y77EDbln7omcyL+cGvCgBhhYpTbtbuBtzW4CiCvcfEB5N4EtJKOTRJXIpL/d3
-oVnZruqRRKidKwFMEZU2NZJX5FneAWFSeCv0IrY2vAUIc3El+n84CFFK
------END ENCRYPTED PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/ca3.cnf b/node_modules/tunnel/test/keys/ca3.cnf
deleted file mode 100644
index 7b2378a..0000000
--- a/node_modules/tunnel/test/keys/ca3.cnf
+++ /dev/null
@@ -1,17 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-output_password = password
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = ca3
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/ca4-cert.pem b/node_modules/tunnel/test/keys/ca4-cert.pem
deleted file mode 100644
index ed0686a..0000000
--- a/node_modules/tunnel/test/keys/ca4-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICIzCCAYwCCQDUGh2r7lOpITANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww
-CgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu
-anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOOC+SPC8XzkjIHfKPMzzNV6
-O/LpqQWdzJtEvFNW0oQ9g8gSV4iKqwUFrLNnSlwSGigvqKqGmYtG8S17ANWInoxI
-c3sQlrS2cGbgLUBNKu4hZ7s+11EPOjbnn0QUE5w9GN8fy8CDx7ID/8URYKoxcoRv
-0w7EJ2agfd68KS1ayxUXAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAumPFeR63Dyki
-SWQtRAe2QWkIFlSRAR2PvSDdsDMLwMeXF5wD3Hv51yfTu9Gkg0QJB86deYfQ5vfV
-4QsOQ35icesa12boyYpTE0/OoEX1f/s1sLlszpRvtAki3J4bkcGWAzM5yO1fKqpQ
-MbtPzLn+DA7ymxuJa6EQAEb+kaJEBuU=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/ca4-cert.srl b/node_modules/tunnel/test/keys/ca4-cert.srl
deleted file mode 100644
index 5c11314..0000000
--- a/node_modules/tunnel/test/keys/ca4-cert.srl
+++ /dev/null
@@ -1 +0,0 @@
-B01FE0416A2EDCF5
diff --git a/node_modules/tunnel/test/keys/ca4-key.pem b/node_modules/tunnel/test/keys/ca4-key.pem
deleted file mode 100644
index fa7aca1..0000000
--- a/node_modules/tunnel/test/keys/ca4-key.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN ENCRYPTED PRIVATE KEY-----
-MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIWE/ri/feeikCAggA
-MBQGCCqGSIb3DQMHBAiu6hUzoFnsVASCAoC53ZQ4gxLcFnb5yAcdCl4DdKOJ5m4G
-CHosR87pJpZlO68DsCKwORUp9tTmb1/Q4Wm9n2kRf6VQNyVVm6REwzEPAgIJEgy2
-FqLmfqpTElbRsQako8UDXjDjaMO30e+Qhy8HOTrHMJZ6LgrU90xnOCPPeN9fYmIu
-YBkX4qewUfu+wFzk/unUbFLChvJsEN4fdrlDwTJMHRzKwbdvg3mHlCnspWwjA2Mc
-q27QPeb3mwRUajmqL0dT9y7wVYeAN2zV59VoWm6zV+dWFgyMlVrVCRYkqQC3xOsy
-ZlKrGldrY8nNdv5s6+Sc7YavTJiJxHgIB7sm6QFIsdqjxTBEGD4/YhEI52SUw/xO
-VJmOTWdWUz4FdWNi7286nfhZ0+mdv6fUoG54Qv6ahnUMJvEsp60LkR1gHXLzQu/m
-+yDZFqY/IIg2QA7M3gL0Md5GrWydDlD2uBPoXcC4A5gfOHswzHWDKurDCpoMqdpn
-CUQ/ZVl2rwF8Pnty61MjY1xCN1r8xQjFBCgcfBWw5v6sNRbr/vef3TfQIBzVm+hx
-akDb1nckBsIjMT9EfeT6hXub2n0oehEHewF1COifbcOjnxToLSswPLrtb0behB+o
-zTgftn+4XrkY0sFY69TzYtQVMLAsiWTpZFvAi+D++2pXlQ/bnxKJiBBc6kZuAGpN
-z+cJ4kUuFE4S9v5C5vK89nIgcuJT06u8wYTy0N0j/DnIjSaVgGr0Y0841mXtU1VV
-wUZjuyYrVwVT/g5r6uzEFldTcjmYkbMaxo+MYnEZZgqYJvu2QlK87YxJOwo+D1NX
-4gl1s/bmlPlGw/t9TxutI3S9PEr3JM3013e9UPE+evlTG9IIrZaUPzyj
------END ENCRYPTED PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/ca4.cnf b/node_modules/tunnel/test/keys/ca4.cnf
deleted file mode 100644
index ceac8f3..0000000
--- a/node_modules/tunnel/test/keys/ca4.cnf
+++ /dev/null
@@ -1,17 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-output_password = password
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = ca4
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/client.cnf b/node_modules/tunnel/test/keys/client.cnf
deleted file mode 100644
index e3db741..0000000
--- a/node_modules/tunnel/test/keys/client.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = localhost
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/client1-cert.pem b/node_modules/tunnel/test/keys/client1-cert.pem
deleted file mode 100644
index 24ea1db..0000000
--- a/node_modules/tunnel/test/keys/client1-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKTCCAZICCQDveyzw+mHfQTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
-EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
-ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYUuKyuxT93zvrS
-mL8IMI8xu8dP3iRZDUYu6dmq6Dntgb7intfzxtEFVmfNCDGwJwg7UKx/FzftGxFb
-9LksuvAQuW2FLhCrOmXUVU938OZkQRSflISD80kd4i9JEoKKYPX1imjaMugIQ0ta
-Bq2orY6sna8JAUVDW6WO3wVEJ4mBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAAbaH
-bc/6dIFC9TPIDrgsLtsOtycdBJqKbFT1wThhyKncXF/iyaI+8N4UA+hXMjk8ODUl
-BVmmgaN6ufMLwnx/Gdl9FLmmDq4FQ4zspClTJo42QPzg5zKoPSw5liy73LM7z+nG
-g6IeM8RFlEbs109YxqvQnbHfTgeLdIsdvtNXU80=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/client1-csr.pem b/node_modules/tunnel/test/keys/client1-csr.pem
deleted file mode 100644
index c33a135..0000000
--- a/node_modules/tunnel/test/keys/client1-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
-MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
-dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGFLisrsU/d876
-0pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X88bRBVZnzQgxsCcIO1Csfxc37RsR
-W/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SEg/NJHeIvSRKCimD19Ypo2jLoCENL
-WgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
-Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAB5NvNSHX+WDlF5R
-LNr7SI2NzIy5OWEAgTxLkvS0NS75zlDLScaqwgs1uNfB2AnH0Fpw9+pePEijlb+L
-3VRLNpV8hRn5TKztlS3O0Z4PPb7hlDHitXukTOQYrq0juQacodVSgWqNbac+O2yK
-qf4Y3A7kQO1qmDOfN6QJFYVIpPiP
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/client1-key.pem b/node_modules/tunnel/test/keys/client1-key.pem
deleted file mode 100644
index 52aff97..0000000
--- a/node_modules/tunnel/test/keys/client1-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDGFLisrsU/d8760pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X
-88bRBVZnzQgxsCcIO1Csfxc37RsRW/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SE
-g/NJHeIvSRKCimD19Ypo2jLoCENLWgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQAB
-AoGAbfcM+xjfejeqGYcWs175jlVe2OyW93jUrLTYsDV4TMh08iLfaiX0pw+eg2vI
-88TGNoSvacP4gNzJ3R4+wxp5AFlRKZ876yL7D0VKavMFwbyRk21+D/tLGvW6gqOC
-4qi4IWSkfgBh5RK+o4jZcl5tzRPQyuxR3pJGBS33q5K2dEECQQDhV4NuKZcGDnKt
-1AhmtzqsJ4wrp2a3ysZYDTWyA692NGXi2Vnpnc6Aw9JchJhT3cueFLcOTFrb/ttu
-ZC/iA67pAkEA4Qe7LvcPvHlwNAmzqzOg2lYAqq+aJY2ghfJMqr3dPCJqbHJnLN6p
-GXsqGngwVlnvso0O/n5g30UmzvkRMFZW2QJAbOMQy0alh3OrzntKo/eeDln9zYpS
-hDUjqqCXdbF6M7AWG4vTeqOaiXYWTEZ2JPBj17tCyVH0BaIc/jbDPH9zIQJBALei
-YH0l/oB2tTqyBB2cpxIlhqvDW05z8d/859WZ1PVivGg9P7cdCO+TU7uAAyokgHe7
-ptXFefYZb18NX5qLipkCQHjIo4BknrO1oisfsusWcCC700aRIYIDk0QyEEIAY3+9
-7ar/Oo1EbqWA/qN7zByPuTKrjrb91/D+IMFUFgb4RWc=
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/client1.cnf b/node_modules/tunnel/test/keys/client1.cnf
deleted file mode 100644
index e3db741..0000000
--- a/node_modules/tunnel/test/keys/client1.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = localhost
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/client2-cert.pem b/node_modules/tunnel/test/keys/client2-cert.pem
deleted file mode 100644
index f0de53c..0000000
--- a/node_modules/tunnel/test/keys/client2-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKTCCAZICCQCwH+BBai7c9TANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
-EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
-ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMJQGt34PZX5pQmi
-3bNp3dryr7qPO3oGhTeShLCeZ6PPCdnmVl0PnT0n8/DFBlaijbvXGU9AjcFZ7gg7
-hcSAFLGmPEb2pug021yzl7u0qUD2fnVaEzfJ04ZU4lUCFqGKsfFVQuIkDHFwadbE
-AO+8EqOmDynUMkKfHPWQK6O9jt5ZAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA143M
-QIygJGDv2GFKlVgV05/CYZo6ouX9I6vPRekJnGeL98lmVH83Ogb7Xmc2SbJ18qFq
-naBYnUEmHPUAZ2Ms2KuV3OOvscUSCsEJ4utJYznOT8PsemxVWrgG1Ba+zpnPkdII
-p+PanKCsclNUKwBlSkJ8XfGi9CAZJBykwws3O1c=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/client2-csr.pem b/node_modules/tunnel/test/keys/client2-csr.pem
deleted file mode 100644
index b7507f4..0000000
--- a/node_modules/tunnel/test/keys/client2-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
-MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
-dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCUBrd+D2V+aUJ
-ot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZdD509J/PwxQZWoo271xlPQI3BWe4I
-O4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3ydOGVOJVAhahirHxVULiJAxxcGnW
-xADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
-Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAA//UPKPpVEpflDj
-DBboWewa6yw8FEOnMvh6eeg/a8KbXfIYnkZRtxbmH06ygywBy/RUBCbM5EzyElkJ
-bTVKorzCHnxuTfSnKQ68ZD+vI2SNjiWqQFXW6oOCPzLbtaTJVKw5D6ylBp8Zsu6n
-BzQ/4Y42aX/HW4nfJeDydxNFYVJJ
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/client2-key.pem b/node_modules/tunnel/test/keys/client2-key.pem
deleted file mode 100644
index ecb616e..0000000
--- a/node_modules/tunnel/test/keys/client2-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICWwIBAAKBgQDCUBrd+D2V+aUJot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZd
-D509J/PwxQZWoo271xlPQI3BWe4IO4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3
-ydOGVOJVAhahirHxVULiJAxxcGnWxADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQAB
-AoGAbiT0JdCaMFIzb/PnEdU30e1xGSIpx7C8gNTH7EnOW7d3URHU8KlyKwFjsJ4u
-SpuYFdsG2Lqx3+D3IamD2O/1SgODmtdFas1C/hQ2zx42SgyBQolVJU1MHJxHqmCb
-nm2Wo8aHmvFXpQ8OF4YJLPxLOSdvmq0PC17evDyjz5PciWUCQQD5yzaBpJ7yzGwd
-b6nreWj6pt+jfi11YsA3gAdvTJcFzMGyNNC+U9OExjQqHsyaHyxGhHKQ6y+ybZkR
-BggkudPfAkEAxyQC/hmcvWegdGI4xOJNbm0kv8UyxyeqhtgzEW2hWgEQs4k3fflZ
-iNpvxyIBIp/7zZo02YqeQfZlDYuxKypUxwJAa6jQBzRCZXcBqfY0kA611kIR5U8+
-nHdBTSpbCfdCp/dGDF6DEWTjpzgdx4GawVpqJMJ09kzHM+nUrOeinuGQlQJAMAsV
-Gb6OHPfaMxnbPkymh6SXQBjQNlHwhxWzxFmhmrg1EkthcufsXOLuIqmmgnb8Zc71
-PyJ9KcbK/GieNp7A0wJAIz3Mm3Up9Rlk25TH9k5e3ELjC6fkd93u94Uo145oTgDm
-HSbCbjifP5eVl66PztxZppG2GBXiXT0hA/RMruTQMg==
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/client2.cnf b/node_modules/tunnel/test/keys/client2.cnf
deleted file mode 100644
index e3db741..0000000
--- a/node_modules/tunnel/test/keys/client2.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = localhost
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/proxy1-cert.pem b/node_modules/tunnel/test/keys/proxy1-cert.pem
deleted file mode 100644
index 30851fe..0000000
--- a/node_modules/tunnel/test/keys/proxy1-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKTCCAZICCQCb8tSy4A7fFTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
-EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
-ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALiUyeosVxtJK8G4
-sAqU2DBLx5sMuZpV/YcW/YxUuJv3t/9TpVxcWAs6VRPzi5fqKe8TER8qxi1/I8zV
-Qks1gWyZ01reU6Wpdt1MZguF036W2qKOxlJXvnqnRDWu9IFf6KMjSJjFZb6nqhQv
-aiL/80hqc2qXVfuJbSYlGrKWFFINAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEABPIn
-+vQoDpJx7lVNJNOe7DE+ShCXCK6jkQY8+GQXB1sz5K0OWdZxUWOOp/fcjNJua0NM
-hgnylWu/pmjPh7c9xHdZhuh6LPD3F0k4QqK+I2rg45gdBPZT2IxEvxNYpGIfayvY
-ofOgbienn69tMzGCMF/lUmEJu7Bn08EbL+OyNBg=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/proxy1-csr.pem b/node_modules/tunnel/test/keys/proxy1-csr.pem
deleted file mode 100644
index 78ad220..0000000
--- a/node_modules/tunnel/test/keys/proxy1-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
-MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
-dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lMnqLFcbSSvB
-uLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6VcXFgLOlUT84uX6invExEfKsYtfyPM
-1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZSV756p0Q1rvSBX+ijI0iYxWW+p6oU
-L2oi//NIanNql1X7iW0mJRqylhRSDQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
-Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAFhZc2cvYGf8mCg/
-5nPWmnjNIqgy7uJnOGfE3AP4rW48yiVHCJK9ZmPogbH7gBMOBrrX8fLX3ThK9Sbj
-uJlBlZD/19zjM+kvJ14DcievJ15S3KehVQ6Ipmgbz/vnAaL1D+ZiOnjQad2/Fzg4
-0MFXQaZFEUcI8fKnv/zmYi1aivej
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/proxy1-key.pem b/node_modules/tunnel/test/keys/proxy1-key.pem
deleted file mode 100644
index d06fddd..0000000
--- a/node_modules/tunnel/test/keys/proxy1-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC4lMnqLFcbSSvBuLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6Vc
-XFgLOlUT84uX6invExEfKsYtfyPM1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZS
-V756p0Q1rvSBX+ijI0iYxWW+p6oUL2oi//NIanNql1X7iW0mJRqylhRSDQIDAQAB
-AoGADPSkl4M1Of0QzTAhaxy3b+xhvkhOXr7aZLkAYvEvZAMnLwy39puksmUNw7C8
-g5U0DEvST9W4w0jBQodVd+Hxi4dUS4BLDVVStaLMa1Fjai/4uBPxbsrvdHzDu7if
-BI6t12vWNNRtTxbfCJ1Fs3nHvDG0ueBZX3fYWBIPPM4bRQECQQDjmCrxbkfFrN5z
-JXHfmzoNovV7KzgwRLKOLF17dYnhaG3G77JYjhEjIg5VXmQ8XJrwS45C/io5feFA
-qrsy/0v1AkEAz55QK8CLue+sn0J8Yw//yLjJT6BK4pCFFKDxyAvP/3r4t7+1TgDj
-KAfUMWb5Hcn9iT3sEykUeOe0ghU0h5X2uQJBAKES2qGPuP/vvmejwpnMVCO+hxmq
-ltOiavQv9eEgaHq826SFk6UUtpA01AwbB7momIckEgTbuKqDql2H94C6KdkCQQC7
-PfrtyoP5V8dmBk8qBEbZ3pVn45dFx7LNzOzhTo3yyhO/m/zGcZRsCMt9FnI7RG0M
-tjTPfvAArm8kFj2+vie5AkASvVx478N8so+02QWKme4T3ZDX+HDBXgFH1+SMD91m
-9tS6x2dtTNvvwBA2KFI1fUg3B/wDoKJQRrqwdl8jpoGP
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/proxy1.cnf b/node_modules/tunnel/test/keys/proxy1.cnf
deleted file mode 100644
index e3db741..0000000
--- a/node_modules/tunnel/test/keys/proxy1.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = localhost
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/proxy2-cert.pem b/node_modules/tunnel/test/keys/proxy2-cert.pem
deleted file mode 100644
index dfe9d8e..0000000
--- a/node_modules/tunnel/test/keys/proxy2-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICJjCCAY8CCQCb8tSy4A7fFjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBZMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQ8w
-DQYDVQQDEwZwcm94eTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1l
-bnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZ3oNCmB2P4Q9DoUVFq
-Z1ByASLm63jTPEumv2kX81GF5QMLRl59HBM6Te1rRR7wFHL0iBQUYuEzNPmedXpU
-cds0uWl5teoO63ZSKFL1QLU3PMFo56AeWeznxOhy6vwWv3M8C391X6lYsiBow3K9
-d37p//GLIR+jl6Q4xYD41zaxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADUQgtmot
-8zqsRQInjWAypcntkxX8hdUOEudN2/zjX/YtMZbr8rRvsZzBsUDdgK+E2EmEb/N3
-9ARZ0T2zWFFphJapkZOM1o1+LawN5ON5HfTPqr6d9qlHuRdGCBpXMUERO2V43Z+S
-Zwm+iw1yZEs4buTmiw6zu6Nq0fhBlTiAweE=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/proxy2-csr.pem b/node_modules/tunnel/test/keys/proxy2-csr.pem
deleted file mode 100644
index 5510e7f..0000000
--- a/node_modules/tunnel/test/keys/proxy2-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBvjCCAScCAQAwWTELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEP
-MA0GA1UEAxMGcHJveHkyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt
-ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2d6DQpgdj+EPQ6FFR
-amdQcgEi5ut40zxLpr9pF/NRheUDC0ZefRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6
-VHHbNLlpebXqDut2UihS9UC1NzzBaOegHlns58Tocur8Fr9zPAt/dV+pWLIgaMNy
-vXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hh
-bGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBADC4dh/+gQnJcPMQ0riJ
-CBVLygcCWxkNvwM3ARboyihuNbzFX1f2g23Zr5iLphiuEFCPDOyd26hHieQ8Xo1y
-FPuDXpWMx9X9MLjCWg8kdtada7HsYffbUvpjjL9TxFh+rX0cmr6Ixc5kV7AV4I6V
-3h8BYJebX+XfuYrI1UwEqjqI
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/proxy2-key.pem b/node_modules/tunnel/test/keys/proxy2-key.pem
deleted file mode 100644
index 29eed2c..0000000
--- a/node_modules/tunnel/test/keys/proxy2-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC2d6DQpgdj+EPQ6FFRamdQcgEi5ut40zxLpr9pF/NRheUDC0Ze
-fRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6VHHbNLlpebXqDut2UihS9UC1NzzBaOeg
-Hlns58Tocur8Fr9zPAt/dV+pWLIgaMNyvXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQAB
-AoGBALPH0o9Bxu5c4pSnEdgh+oFskmoNE90MY9A2D0pA6uBcCHSjW0YmBs97FuTi
-WExPSBarkJgYLgStK3j3A9Dv+uzRRT0gSr34vKFh5ozI+nJZOMNJyHDOCFiT9sm7
-urDW0gSq9OW/H8NbAkxkBZw0PaB9oW5nljuieVIFDYXNAeMBAkEA6NfBHjzp3GS0
-RbtaBkxn3CRlEoUUPVd3sJ6lW2XBu5AWrgNHRSlh0oBupXgd3cxWIB69xPOg6QjU
-XmvcLjBlCQJBAMidTIw4s89m4+14eY/KuXaEgxW/awLEbQP2JDCjY1wT3Ya3Ggac
-HIFuGdTbd2faJPxNJjoljZnatSdwY5aXFmkCQBQZM5FBnsooYys1vdKXW8uz1Imh
-tRqKZ0l2mD1obi2bhWml3MwKg2ghL+vWj3VqwvBo1uaeRQB4g6RW2R2fjckCQQCf
-FnZ0oCafa2WGlMo5qDbI8K6PGXv/9srIoHH0jC0oAKzkvuEJqtTEIw6jCOM43PoF
-hhyxccRH5PNRckPXULs5AkACxKEL1dN+Bx72zE8jSU4DB5arpQdGOvuVsqXgVM/5
-QLneJEHGPCqNFS1OkWUYLtX0S28X5GmHMEpLRLpgE9JY
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/proxy2.cnf b/node_modules/tunnel/test/keys/proxy2.cnf
deleted file mode 100644
index e62c90a..0000000
--- a/node_modules/tunnel/test/keys/proxy2.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = proxy2
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/server1-cert.pem b/node_modules/tunnel/test/keys/server1-cert.pem
deleted file mode 100644
index d0b6430..0000000
--- a/node_modules/tunnel/test/keys/server1-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICKTCCAZICCQCxEcnO8CV2kTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw
-EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92
-ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALYb3z6TVgD8VmV2
-i0IHoes/HNVz+/UgXxRoA7gTUXp4Q69HBymWwm4fG61YMn7XAjy0gyC2CX/C0S74
-ZzHkhq1DCXCtlXCDx5oZhSRPpa902MVdDSRR+naLA4PPFkV2pI53hsFW37M5Dhge
-+taFbih/dbjpOnhLD+SbkSKNTw/dAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAjDNi
-mdmMM8Of/8iCYISqkqCG+7fz747Ntkg5fVMPufkwrBfkD9UjYVbfIpEOkZ3L0If9
-0/wNi0uZobIJnd/9B/e0cHKYnx0gkhUpMylaRvIV4odKe2vq3+mjwMb9syYXYDx3
-hw2qDMIIPr0S5ICeoIKXhbsYtODVxKSdJq+FjAI=
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/server1-csr.pem b/node_modules/tunnel/test/keys/server1-csr.pem
deleted file mode 100644
index 9d9ff1b..0000000
--- a/node_modules/tunnel/test/keys/server1-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES
-MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv
-dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2G98+k1YA/FZl
-dotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcplsJuHxutWDJ+1wI8tIMgtgl/wtEu
-+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0kUfp2iwODzxZFdqSOd4bBVt+zOQ4Y
-HvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg
-Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAJLLYClTc1BZbQi4
-2GrGEimzJoheXXD1vepECS6TaeYJFSQldMGdkn5D8TMXWW115V4hw7a1pCwvRBPH
-dVEeh3u3ktI1e4pS5ozvpbpYanILrHCNOQ4PvKi9rzG9Km8CprPcrJCZlWf2QUBK
-gVNgqZJeqyEcBu80/ajjc6xrZsSP
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/server1-key.pem b/node_modules/tunnel/test/keys/server1-key.pem
deleted file mode 100644
index d24acc8..0000000
--- a/node_modules/tunnel/test/keys/server1-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQC2G98+k1YA/FZldotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcp
-lsJuHxutWDJ+1wI8tIMgtgl/wtEu+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0k
-Ufp2iwODzxZFdqSOd4bBVt+zOQ4YHvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQAB
-AoGAcDioz+T3gM//ZbMxidUuQMu5twgsYhg6v1aBxDOTaEcoXqEElupikn31DlNl
-eqiApmwOyl+jZunlAm7tGN/c5WjmZtW6watv1D7HjDIFJQBdiOv2jLeV5gsoArMP
-f8Y13MS68nJ7/ZkqisovjBlD7ZInbyUiJj0FH/cazauflIECQQDwHgQ0J46eL5EG
-3smQQG9/8b/Wsnf8s9Vz6X/KptsbL3c7mCBY9/+cGw0xVxoUOyO7KGPzpRhtz4Y0
-oP+JwISxAkEAwieUtl+SuUAn6er1tZzPPiAM2w6XGOAod+HuPjTAKVhLKHYIEJbU
-jhPdjOGtZr10ED9g0m7M4n3JKMMM00W47QJBAOVkp7tztwpkgva/TG0lQeBHgnCI
-G50t6NRN1Koz8crs88nZMb4NXwMxzM7AWcfOH/qjQan4pXfy9FG/JaHibGECQH8i
-L+zj1E3dxsUTh+VuUv5ZOlHO0f4F+jnWBY1SOWpZWI2cDFfgjDqko3R26nbWI8Pn
-3FyvFRZSS4CXiDRn+VkCQQCKPBl60QAifkZITqL0dCs+wB2hhmlWwqlpq1ZgeCby
-zwmZY1auUK1BYBX1aPB85+Bm2Zhp5jnkwRcO7iSYy8+C
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/server1.cnf b/node_modules/tunnel/test/keys/server1.cnf
deleted file mode 100644
index e3db741..0000000
--- a/node_modules/tunnel/test/keys/server1.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = localhost
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/server2-cert.pem b/node_modules/tunnel/test/keys/server2-cert.pem
deleted file mode 100644
index ba92620..0000000
--- a/node_modules/tunnel/test/keys/server2-cert.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICJzCCAZACCQCxEcnO8CV2kjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK
-UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B
-CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw
-NTEwMTEyMzIxWjBaMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRAw
-DgYDVQQDEwdzZXJ2ZXIyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt
-ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEkKr9SHG6jtf5UNfL
-u66wNi8jrbAW5keYy7ECWRGRFDE7ay4N8LDMmOO3/1eH2WpY0QM5JFxq78hoVQED
-ogvoeVTw+Ni33yqY6VL2WRv84FN2BmCrDGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEu
-hvsp722KcToIrqt8mHKMc/nPRwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBALbdQz32
-CN0hJfJ6BtGyqee3zRSpufPY1KFV8OHSDG4qL55OfpjB5e5wsldp3VChTWzm2KM+
-xg9WSWurMINM5KLgUqCZ69ttg1gJ/SnZNolXhH0I3SG/DY4DGTHo9oJPoSrgrWbX
-3ZmCoO6rrDoSuVRJ8dKMWJmt8O1pZ6ZRW2iM
------END CERTIFICATE-----
diff --git a/node_modules/tunnel/test/keys/server2-csr.pem b/node_modules/tunnel/test/keys/server2-csr.pem
deleted file mode 100644
index f89c510..0000000
--- a/node_modules/tunnel/test/keys/server2-csr.pem
+++ /dev/null
@@ -1,12 +0,0 @@
------BEGIN CERTIFICATE REQUEST-----
-MIIBvzCCASgCAQAwWjELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEQ
-MA4GA1UEAxMHc2VydmVyMjElMCMGCSqGSIb3DQEJARYWa29pY2hpa0BpbXByb3Zl
-bWVudC5qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxJCq/Uhxuo7X+VDX
-y7uusDYvI62wFuZHmMuxAlkRkRQxO2suDfCwzJjjt/9Xh9lqWNEDOSRcau/IaFUB
-A6IL6HlU8PjYt98qmOlS9lkb/OBTdgZgqwxiUPNxGHbCaj1J8bl725qu1YsN5fwR
-Lob7Ke9tinE6CK6rfJhyjHP5z0cCAwEAAaAlMCMGCSqGSIb3DQEJBzEWExRBIGNo
-YWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAAOBgQB3rCGCErgshGKEI5j9
-togUBwD3ul91yRFSBoV2hVGXsTOalWa0XCI+9+5QQEOBlj1pUT8eDU8ve55mX1UX
-AZEx+cbUQa9DNeiDAMX83GqHMD8fF2zqsY1mkg5zFKG3nhoIYSG15qXcpqAhxRpX
-NUQnZ4yzt2pE0aiFfkXa3PM42Q==
------END CERTIFICATE REQUEST-----
diff --git a/node_modules/tunnel/test/keys/server2-key.pem b/node_modules/tunnel/test/keys/server2-key.pem
deleted file mode 100644
index 9f72b5c..0000000
--- a/node_modules/tunnel/test/keys/server2-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDEkKr9SHG6jtf5UNfLu66wNi8jrbAW5keYy7ECWRGRFDE7ay4N
-8LDMmOO3/1eH2WpY0QM5JFxq78hoVQEDogvoeVTw+Ni33yqY6VL2WRv84FN2BmCr
-DGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEuhvsp722KcToIrqt8mHKMc/nPRwIDAQAB
-AoGAQ/bRaGoYCK1DN80gEC2ApSTW/7saW5CbyNUFCw7I6CTXMPhKID/MobFraz86
-gJpIDxWVy7gqzD7ESG67vwnUm52ITojQiY3JH7NCNhq/39/aYZOz2d7rBv2mvhk3
-w7gxUsmtPVUz3s2/h1KYaGpM3b68TwMS9nIiwwHDJS1aR8ECQQDu/kOy+Z/0EVKC
-APgiEzbxewAiy7BVzNppd8CR/5m1KxlsIoMr8OdLqVwiJ/13m3eZGkPNx5pLJ9Xv
-sXER0ZcPAkEA0o19xA1AJ/v5qsRaWJaA+ftgQ8ZanqsWXhM9abAvkPdFLPKYWTfO
-r9f8eUDH0+O9mA2eZ2mlsEcsmIHDTY6ESQJAO2lyIvfzT5VO0Yq0JKRqMDXHnt7M
-A0hds4JVmPXVnDgOpdcejLniheigQs12MVmwrZrd6DYKoUxR3rhZx3g2+QJBAK/2
-5fuaI1sHP+HSlbrhlUrWJd6egA+I5nma1MFmKGqb7Kki2eX+OPNGq87eL+LKuyG/
-h/nfFkTbRs7x67n+eFkCQQCPgy381Vpa7lmoNUfEVeMSNe74FNL05IlPDs/BHcci
-1GX9XzsFEqHLtJ5t1aWbGv39gb2WmPP3LJBsRPzLa2iQ
------END RSA PRIVATE KEY-----
diff --git a/node_modules/tunnel/test/keys/server2.cnf b/node_modules/tunnel/test/keys/server2.cnf
deleted file mode 100644
index bfaa48b..0000000
--- a/node_modules/tunnel/test/keys/server2.cnf
+++ /dev/null
@@ -1,16 +0,0 @@
-[ req ]
-default_bits = 1024
-days = 9999
-distinguished_name = req_distinguished_name
-attributes = req_attributes
-prompt = no
-
-[ req_distinguished_name ]
-C = JP
-OU = nodejs_jp
-CN = server2
-emailAddress = koichik@improvement.jp
-
-[ req_attributes ]
-challengePassword = A challenge password
-
diff --git a/node_modules/tunnel/test/keys/test.js b/node_modules/tunnel/test/keys/test.js
deleted file mode 100644
index d828422..0000000
--- a/node_modules/tunnel/test/keys/test.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var fs = require('fs');
-var tls = require('tls');
-
-var server1Key = fs.readFileSync(__dirname + '/server1-key.pem');
-var server1Cert = fs.readFileSync(__dirname + '/server1-cert.pem');
-var clientKey = fs.readFileSync(__dirname + '/client-key.pem');
-var clientCert = fs.readFileSync(__dirname + '/client-cert.pem');
-var ca1Cert = fs.readFileSync(__dirname + '/ca1-cert.pem');
-var ca3Cert = fs.readFileSync(__dirname + '/ca3-cert.pem');
-
-var server = tls.createServer({
- key: server1Key,
- cert: server1Cert,
- ca: [ca3Cert],
- requestCert: true,
- rejectUnauthorized: true,
-}, function(s) {
- console.log('connected on server');
- s.on('data', function(chunk) {
- console.log('S:' + chunk);
- s.write(chunk);
- });
- s.setEncoding('utf8');
-}).listen(3000, function() {
- var c = tls.connect({
- host: 'localhost',
- port: 3000,
- key: clientKey,
- cert: clientCert,
- ca: [ca1Cert],
- rejectUnauthorized: true
- }, function() {
- console.log('connected on client');
- c.on('data', function(chunk) {
- console.log('C:' + chunk);
- });
- c.setEncoding('utf8');
- c.write('Hello');
- });
- c.on('error', function(err) {
- console.log(err);
- });
-});
diff --git a/node_modules/typed-rest-client/HttpClient.js b/node_modules/typed-rest-client/HttpClient.js
index 48763bb..f2c2e34 100644
--- a/node_modules/typed-rest-client/HttpClient.js
+++ b/node_modules/typed-rest-client/HttpClient.js
@@ -72,7 +72,9 @@ class HttpClientResponse {
const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset);
resolve(gunzippedBody);
}
- resolve(buffer.toString(encodingCharset));
+ else {
+ resolve(buffer.toString(encodingCharset));
+ }
});
}).on('error', function (err) {
reject(err);
@@ -286,7 +288,6 @@ class HttpClient {
*/
requestRawWithCallback(info, data, onResult) {
let socket;
- let isDataString = typeof (data) === 'string';
if (typeof (data) === 'string') {
info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
}
@@ -307,7 +308,7 @@ class HttpClient {
// If we ever get disconnected, we want the socket to timeout eventually
req.setTimeout(this._socketTimeout || 3 * 60000, () => {
if (socket) {
- socket.end();
+ socket.destroy();
}
handleResult(new Error('Request timeout: ' + info.options.path), null);
});
diff --git a/node_modules/typed-rest-client/LICENSE b/node_modules/typed-rest-client/LICENSE
index d4b626b..0f14def 100644
--- a/node_modules/typed-rest-client/LICENSE
+++ b/node_modules/typed-rest-client/LICENSE
@@ -19,3 +19,21 @@ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE A
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+/* Node-SMB/ntlm
+ * https://github.com/Node-SMB/ntlm
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Copyright (C) 2012 Joshua M. Clulow
+ */
diff --git a/node_modules/typed-rest-client/RestClient.d.ts b/node_modules/typed-rest-client/RestClient.d.ts
index 9feb7a8..45a1174 100644
--- a/node_modules/typed-rest-client/RestClient.d.ts
+++ b/node_modules/typed-rest-client/RestClient.d.ts
@@ -24,7 +24,7 @@ export declare class RestClient {
* @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied)
* @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout)
*/
- constructor(userAgent: string, baseUrl?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions);
+ constructor(userAgent: string | null | undefined, baseUrl?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions);
private _baseUrl;
/**
* Gets a resource from an endpoint
diff --git a/node_modules/typed-rest-client/handlers/basiccreds.js b/node_modules/typed-rest-client/handlers/basiccreds.js
index 3e4acf9..26a5085 100644
--- a/node_modules/typed-rest-client/handlers/basiccreds.js
+++ b/node_modules/typed-rest-client/handlers/basiccreds.js
@@ -10,7 +10,7 @@ class BasicCredentialHandler {
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
- options.headers['Authorization'] = 'Basic ' + new Buffer(this.username + ':' + this.password).toString('base64');
+ options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
}
// This handler cannot handle 401
diff --git a/node_modules/typed-rest-client/handlers/bearertoken.js b/node_modules/typed-rest-client/handlers/bearertoken.js
index f9718f6..3b6d267 100644
--- a/node_modules/typed-rest-client/handlers/bearertoken.js
+++ b/node_modules/typed-rest-client/handlers/bearertoken.js
@@ -9,7 +9,7 @@ class BearerCredentialHandler {
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
- options.headers['Authorization'] = 'Bearer ' + this.token;
+ options.headers['Authorization'] = `Bearer ${this.token}`;
options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
}
// This handler cannot handle 401
diff --git a/node_modules/typed-rest-client/handlers/ntlm.js b/node_modules/typed-rest-client/handlers/ntlm.js
index 6b69bb0..69bec4a 100644
--- a/node_modules/typed-rest-client/handlers/ntlm.js
+++ b/node_modules/typed-rest-client/handlers/ntlm.js
@@ -5,24 +5,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
const http = require("http");
const https = require("https");
const _ = require("underscore");
-const ntlm = require("../opensource/node-http-ntlm/ntlm");
+const ntlm = require("../opensource/Node-SMB/lib/ntlm");
class NtlmCredentialHandler {
constructor(username, password, workstation, domain) {
this._ntlmOptions = {};
this._ntlmOptions.username = username;
this._ntlmOptions.password = password;
- if (domain !== undefined) {
- this._ntlmOptions.domain = domain;
- }
- else {
- this._ntlmOptions.domain = '';
- }
- if (workstation !== undefined) {
- this._ntlmOptions.workstation = workstation;
- }
- else {
- this._ntlmOptions.workstation = '';
- }
+ this._ntlmOptions.domain = domain || '';
+ this._ntlmOptions.workstation = workstation || '';
}
prepareRequest(options) {
// No headers or options need to be set. We keep the credentials on the handler itself.
@@ -36,13 +26,7 @@ class NtlmCredentialHandler {
// Ensure that we're talking NTLM here
// Once we have the www-authenticate header, split it so we can ensure we can talk NTLM
const wwwAuthenticate = response.message.headers['www-authenticate'];
- if (wwwAuthenticate) {
- const mechanisms = wwwAuthenticate.split(', ');
- const index = mechanisms.indexOf("NTLM");
- if (index >= 0) {
- return true;
- }
- }
+ return wwwAuthenticate && (wwwAuthenticate.split(', ').indexOf("NTLM") >= 0);
}
return false;
}
@@ -68,12 +52,9 @@ class NtlmCredentialHandler {
domain: this._ntlmOptions.domain,
workstation: this._ntlmOptions.workstation
});
- if (httpClient.isSsl === true) {
- requestInfo.options.agent = new https.Agent({ keepAlive: true });
- }
- else {
- requestInfo.options.agent = new http.Agent({ keepAlive: true });
- }
+ requestInfo.options.agent = httpClient.isSsl ?
+ new https.Agent({ keepAlive: true }) :
+ new http.Agent({ keepAlive: true });
let self = this;
// The following pattern of sending the type1 message following immediately (in a setImmediate) is
// critical for the NTLM exchange to happen. If we removed setImmediate (or call in a different manner)
@@ -86,7 +67,7 @@ class NtlmCredentialHandler {
res.readBody().then(() => {
// It is critical that we have setImmediate here due to how connection requests are queued.
// If setImmediate is removed then the NTLM handshake will not work.
- // setImmediate allows us to queue a second request on the same connection. If this second
+ // setImmediate allows us to queue a second request on the same connection. If this second
// request is not queued on the connection when the first request finishes then node closes
// the connection. NTLM requires both requests to be on the same connection so we need this.
setImmediate(function () {
@@ -97,7 +78,8 @@ class NtlmCredentialHandler {
}
// The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js
sendType1Message(httpClient, requestInfo, objs, finalCallback) {
- const type1msg = ntlm.createType1Message(this._ntlmOptions);
+ const type1HexBuffer = ntlm.encodeType1(this._ntlmOptions.workstation, this._ntlmOptions.domain);
+ const type1msg = `NTLM ${type1HexBuffer.toString('base64')}`;
const type1options = {
headers: {
'Connection': 'keep-alive',
@@ -117,11 +99,29 @@ class NtlmCredentialHandler {
if (!res.message.headers && !res.message.headers['www-authenticate']) {
throw new Error('www-authenticate not found on response of second request');
}
- const type2msg = ntlm.parseType2Message(res.message.headers['www-authenticate']);
- const type3msg = ntlm.createType3Message(type2msg, this._ntlmOptions);
+ /**
+ * Server will respond with challenge/nonce
+ * assigned to response's "WWW-AUTHENTICATE" header
+ * and should adhere to RegExp /^NTLM\s+(.+?)(,|\s+|$)/
+ */
+ const serverNonceRegex = /^NTLM\s+(.+?)(,|\s+|$)/;
+ const serverNonce = Buffer.from((res.message.headers['www-authenticate'].match(serverNonceRegex) || [])[1], 'base64');
+ let type2msg;
+ /**
+ * Wrap decoding the Server's challenge/nonce in
+ * try-catch block to throw more comprehensive
+ * Error with clear message to consumer
+ */
+ try {
+ type2msg = ntlm.decodeType2(serverNonce);
+ }
+ catch (error) {
+ throw new Error(`Decoding Server's Challenge to Obtain Type2Message failed with error: ${error.message}`);
+ }
+ const type3msg = ntlm.encodeType3(this._ntlmOptions.username, this._ntlmOptions.workstation, this._ntlmOptions.domain, type2msg, this._ntlmOptions.password).toString('base64');
const type3options = {
headers: {
- 'Authorization': type3msg,
+ 'Authorization': `NTLM ${type3msg}`,
'Connection': 'Close'
},
agent: requestInfo.httpModule,
diff --git a/node_modules/typed-rest-client/handlers/personalaccesstoken.js b/node_modules/typed-rest-client/handlers/personalaccesstoken.js
index 7f74bea..7ce8355 100644
--- a/node_modules/typed-rest-client/handlers/personalaccesstoken.js
+++ b/node_modules/typed-rest-client/handlers/personalaccesstoken.js
@@ -9,7 +9,7 @@ class PersonalAccessTokenCredentialHandler {
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
- options.headers['Authorization'] = 'Basic ' + new Buffer('PAT:' + this.token).toString('base64');
+ options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
}
// This handler cannot handle 401
diff --git a/node_modules/typed-rest-client/opensource/Node-SMB/README.md b/node_modules/typed-rest-client/opensource/Node-SMB/README.md
new file mode 100644
index 0000000..c713c11
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/Node-SMB/README.md
@@ -0,0 +1,5 @@
+### Reference:
+The modules (common.js, ntlm.js and smbhash.js) were copied from a file of the same name at https://github.com/Node-SMB/ntlm.
+
+The modules has been used for the purpose of encoding and decoding the headers used during NTLM HTTP Authentication and as of this writing, it is a part of the typed-rest-client module produced by Microsoft.
+
diff --git a/node_modules/typed-rest-client/opensource/Node-SMB/lib/common.js b/node_modules/typed-rest-client/opensource/Node-SMB/lib/common.js
new file mode 100644
index 0000000..9c77fea
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/Node-SMB/lib/common.js
@@ -0,0 +1,61 @@
+var crypto = require('crypto');
+
+function zeroextend(str, len)
+{
+ while (str.length < len)
+ str = '0' + str;
+ return (str);
+}
+
+/*
+ * Fix (odd) parity bits in a 64-bit DES key.
+ */
+function oddpar(buf)
+{
+ for (var j = 0; j < buf.length; j++) {
+ var par = 1;
+ for (var i = 1; i < 8; i++) {
+ par = (par + ((buf[j] >> i) & 1)) % 2;
+ }
+ buf[j] |= par & 1;
+ }
+ return buf;
+}
+
+/*
+ * Expand a 56-bit key buffer to the full 64-bits for DES.
+ *
+ * Based on code sample in:
+ * http://www.innovation.ch/personal/ronald/ntlm.html
+ */
+function expandkey(key56)
+{
+ var key64 = new Buffer(8);
+
+ key64[0] = key56[0] & 0xFE;
+ key64[1] = ((key56[0] << 7) & 0xFF) | (key56[1] >> 1);
+ key64[2] = ((key56[1] << 6) & 0xFF) | (key56[2] >> 2);
+ key64[3] = ((key56[2] << 5) & 0xFF) | (key56[3] >> 3);
+ key64[4] = ((key56[3] << 4) & 0xFF) | (key56[4] >> 4);
+ key64[5] = ((key56[4] << 3) & 0xFF) | (key56[5] >> 5);
+ key64[6] = ((key56[5] << 2) & 0xFF) | (key56[6] >> 6);
+ key64[7] = (key56[6] << 1) & 0xFF;
+
+ return key64;
+}
+
+/*
+ * Convert a binary string to a hex string
+ */
+function bintohex(bin)
+{
+ var buf = (Buffer.isBuffer(buf) ? buf : new Buffer(bin, 'binary'));
+ var str = buf.toString('hex').toUpperCase();
+ return zeroextend(str, 32);
+}
+
+
+module.exports.zeroextend = zeroextend;
+module.exports.oddpar = oddpar;
+module.exports.expandkey = expandkey;
+module.exports.bintohex = bintohex;
diff --git a/node_modules/typed-rest-client/opensource/Node-SMB/lib/ntlm.js b/node_modules/typed-rest-client/opensource/Node-SMB/lib/ntlm.js
new file mode 100644
index 0000000..3723bdd
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/Node-SMB/lib/ntlm.js
@@ -0,0 +1,220 @@
+var log = console.log;
+var crypto = require('crypto');
+var $ = require('./common');
+var lmhashbuf = require('./smbhash').lmhashbuf;
+var nthashbuf = require('./smbhash').nthashbuf;
+
+
+function encodeType1(hostname, ntdomain) {
+ hostname = hostname.toUpperCase();
+ ntdomain = ntdomain.toUpperCase();
+ var hostnamelen = Buffer.byteLength(hostname, 'ascii');
+ var ntdomainlen = Buffer.byteLength(ntdomain, 'ascii');
+
+ var pos = 0;
+ var buf = new Buffer(32 + hostnamelen + ntdomainlen);
+
+ buf.write('NTLMSSP', pos, 7, 'ascii'); // byte protocol[8];
+ pos += 7;
+ buf.writeUInt8(0, pos);
+ pos++;
+
+ buf.writeUInt8(0x01, pos); // byte type;
+ pos++;
+
+ buf.fill(0x00, pos, pos + 3); // byte zero[3];
+ pos += 3;
+
+ buf.writeUInt16LE(0xb203, pos); // short flags;
+ pos += 2;
+
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(ntdomainlen, pos); // short dom_len;
+ pos += 2;
+ buf.writeUInt16LE(ntdomainlen, pos); // short dom_len;
+ pos += 2;
+
+ var ntdomainoff = 0x20 + hostnamelen;
+ buf.writeUInt16LE(ntdomainoff, pos); // short dom_off;
+ pos += 2;
+
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(hostnamelen, pos); // short host_len;
+ pos += 2;
+ buf.writeUInt16LE(hostnamelen, pos); // short host_len;
+ pos += 2;
+
+ buf.writeUInt16LE(0x20, pos); // short host_off;
+ pos += 2;
+
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.write(hostname, 0x20, hostnamelen, 'ascii');
+ buf.write(ntdomain, ntdomainoff, ntdomainlen, 'ascii');
+
+ return buf;
+}
+
+
+/*
+ *
+ */
+function decodeType2(buf)
+{
+ var proto = buf.toString('ascii', 0, 7);
+ if (buf[7] !== 0x00 || proto !== 'NTLMSSP')
+ throw new Error('magic was not NTLMSSP');
+
+ var type = buf.readUInt8(8);
+ if (type !== 0x02)
+ throw new Error('message was not NTLMSSP type 0x02');
+
+ //var msg_len = buf.readUInt16LE(16);
+
+ //var flags = buf.readUInt16LE(20);
+
+ var nonce = buf.slice(24, 32);
+ return nonce;
+}
+
+function encodeType3(username, hostname, ntdomain, nonce, password) {
+ hostname = hostname.toUpperCase();
+ ntdomain = ntdomain.toUpperCase();
+
+ var lmh = new Buffer(21);
+ lmhashbuf(password).copy(lmh);
+ lmh.fill(0x00, 16); // null pad to 21 bytes
+ var nth = new Buffer(21);
+ nthashbuf(password).copy(nth);
+ nth.fill(0x00, 16); // null pad to 21 bytes
+
+ var lmr = makeResponse(lmh, nonce);
+ var ntr = makeResponse(nth, nonce);
+
+ var usernamelen = Buffer.byteLength(username, 'ucs2');
+ var hostnamelen = Buffer.byteLength(hostname, 'ucs2');
+ var ntdomainlen = Buffer.byteLength(ntdomain, 'ucs2');
+ var lmrlen = 0x18;
+ var ntrlen = 0x18;
+
+ var ntdomainoff = 0x40;
+ var usernameoff = ntdomainoff + ntdomainlen;
+ var hostnameoff = usernameoff + usernamelen;
+ var lmroff = hostnameoff + hostnamelen;
+ var ntroff = lmroff + lmrlen;
+
+ var pos = 0;
+ var msg_len = 64 + ntdomainlen + usernamelen + hostnamelen + lmrlen + ntrlen;
+ var buf = new Buffer(msg_len);
+
+ buf.write('NTLMSSP', pos, 7, 'ascii'); // byte protocol[8];
+ pos += 7;
+ buf.writeUInt8(0, pos);
+ pos++;
+
+ buf.writeUInt8(0x03, pos); // byte type;
+ pos++;
+
+ buf.fill(0x00, pos, pos + 3); // byte zero[3];
+ pos += 3;
+
+ buf.writeUInt16LE(lmrlen, pos); // short lm_resp_len;
+ pos += 2;
+ buf.writeUInt16LE(lmrlen, pos); // short lm_resp_len;
+ pos += 2;
+ buf.writeUInt16LE(lmroff, pos); // short lm_resp_off;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(ntrlen, pos); // short nt_resp_len;
+ pos += 2;
+ buf.writeUInt16LE(ntrlen, pos); // short nt_resp_len;
+ pos += 2;
+ buf.writeUInt16LE(ntroff, pos); // short nt_resp_off;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(ntdomainlen, pos); // short dom_len;
+ pos += 2;
+ buf.writeUInt16LE(ntdomainlen, pos); // short dom_len;
+ pos += 2;
+ buf.writeUInt16LE(ntdomainoff, pos); // short dom_off;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(usernamelen, pos); // short user_len;
+ pos += 2;
+ buf.writeUInt16LE(usernamelen, pos); // short user_len;
+ pos += 2;
+ buf.writeUInt16LE(usernameoff, pos); // short user_off;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(hostnamelen, pos); // short host_len;
+ pos += 2;
+ buf.writeUInt16LE(hostnamelen, pos); // short host_len;
+ pos += 2;
+ buf.writeUInt16LE(hostnameoff, pos); // short host_off;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 6); // byte zero[6];
+ pos += 6;
+
+ buf.writeUInt16LE(msg_len, pos); // short msg_len;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.writeUInt16LE(0x8201, pos); // short flags;
+ pos += 2;
+ buf.fill(0x00, pos, pos + 2); // byte zero[2];
+ pos += 2;
+
+ buf.write(ntdomain, ntdomainoff, ntdomainlen, 'ucs2');
+ buf.write(username, usernameoff, usernamelen, 'ucs2');
+ buf.write(hostname, hostnameoff, hostnamelen, 'ucs2');
+ lmr.copy(buf, lmroff, 0, lmrlen);
+ ntr.copy(buf, ntroff, 0, ntrlen);
+
+ return buf;
+}
+
+function makeResponse(hash, nonce)
+{
+ var out = new Buffer(24);
+ for (var i = 0; i < 3; i++) {
+ var keybuf = $.oddpar($.expandkey(hash.slice(i * 7, i * 7 + 7)));
+ var des = crypto.createCipheriv('DES-ECB', keybuf, '');
+ var str = des.update(nonce.toString('binary'), 'binary', 'binary');
+ out.write(str, i * 8, i * 8 + 8, 'binary');
+ }
+ return out;
+}
+
+exports.encodeType1 = encodeType1;
+exports.decodeType2 = decodeType2;
+exports.encodeType3 = encodeType3;
+
+// Convenience methods.
+
+exports.challengeHeader = function (hostname, domain) {
+ return 'NTLM ' + exports.encodeType1(hostname, domain).toString('base64');
+};
+
+exports.responseHeader = function (res, url, domain, username, password) {
+ var serverNonce = new Buffer((res.headers['www-authenticate'].match(/^NTLM\s+(.+?)(,|\s+|$)/) || [])[1], 'base64');
+ var hostname = require('url').parse(url).hostname;
+ return 'NTLM ' + exports.encodeType3(username, hostname, domain, exports.decodeType2(serverNonce), password).toString('base64')
+};
+
+// Import smbhash module.
+
+exports.smbhash = require('./smbhash');
diff --git a/node_modules/typed-rest-client/opensource/Node-SMB/lib/smbhash.js b/node_modules/typed-rest-client/opensource/Node-SMB/lib/smbhash.js
new file mode 100644
index 0000000..d597639
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/Node-SMB/lib/smbhash.js
@@ -0,0 +1,64 @@
+var crypto = require('crypto');
+var $ = require('./common');
+
+/*
+ * Generate the LM Hash
+ */
+function lmhashbuf(inputstr)
+{
+ /* ASCII --> uppercase */
+ var x = inputstr.substring(0, 14).toUpperCase();
+ var xl = Buffer.byteLength(x, 'ascii');
+
+ /* null pad to 14 bytes */
+ var y = new Buffer(14);
+ y.write(x, 0, xl, 'ascii');
+ y.fill(0, xl);
+
+ /* insert odd parity bits in key */
+ var halves = [
+ $.oddpar($.expandkey(y.slice(0, 7))),
+ $.oddpar($.expandkey(y.slice(7, 14)))
+ ];
+
+ /* DES encrypt magic number "KGS!@#$%" to two
+ * 8-byte ciphertexts, (ECB, no padding)
+ */
+ var buf = new Buffer(16);
+ var pos = 0;
+ var cts = halves.forEach(function(z) {
+ var des = crypto.createCipheriv('DES-ECB', z, '');
+ var str = des.update('KGS!@#$%', 'binary', 'binary');
+ buf.write(str, pos, pos + 8, 'binary');
+ pos += 8;
+ });
+
+ /* concat the two ciphertexts to form 16byte value,
+ * the LM hash */
+ return buf;
+}
+
+function nthashbuf(str)
+{
+ /* take MD4 hash of UCS-2 encoded password */
+ var ucs2 = new Buffer(str, 'ucs2');
+ var md4 = crypto.createHash('md4');
+ md4.update(ucs2);
+ return new Buffer(md4.digest('binary'), 'binary');
+}
+
+function lmhash(is)
+{
+ return $.bintohex(lmhashbuf(is));
+}
+
+function nthash(is)
+{
+ return $.bintohex(nthashbuf(is));
+}
+
+module.exports.nthashbuf = nthashbuf;
+module.exports.lmhashbuf = lmhashbuf;
+
+module.exports.nthash = nthash;
+module.exports.lmhash = lmhash;
diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js b/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js
deleted file mode 100644
index 6c8114d..0000000
--- a/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js
+++ /dev/null
@@ -1,389 +0,0 @@
-var crypto = require('crypto');
-
-var flags = {
- NTLM_NegotiateUnicode : 0x00000001,
- NTLM_NegotiateOEM : 0x00000002,
- NTLM_RequestTarget : 0x00000004,
- NTLM_Unknown9 : 0x00000008,
- NTLM_NegotiateSign : 0x00000010,
- NTLM_NegotiateSeal : 0x00000020,
- NTLM_NegotiateDatagram : 0x00000040,
- NTLM_NegotiateLanManagerKey : 0x00000080,
- NTLM_Unknown8 : 0x00000100,
- NTLM_NegotiateNTLM : 0x00000200,
- NTLM_NegotiateNTOnly : 0x00000400,
- NTLM_Anonymous : 0x00000800,
- NTLM_NegotiateOemDomainSupplied : 0x00001000,
- NTLM_NegotiateOemWorkstationSupplied : 0x00002000,
- NTLM_Unknown6 : 0x00004000,
- NTLM_NegotiateAlwaysSign : 0x00008000,
- NTLM_TargetTypeDomain : 0x00010000,
- NTLM_TargetTypeServer : 0x00020000,
- NTLM_TargetTypeShare : 0x00040000,
- NTLM_NegotiateExtendedSecurity : 0x00080000,
- NTLM_NegotiateIdentify : 0x00100000,
- NTLM_Unknown5 : 0x00200000,
- NTLM_RequestNonNTSessionKey : 0x00400000,
- NTLM_NegotiateTargetInfo : 0x00800000,
- NTLM_Unknown4 : 0x01000000,
- NTLM_NegotiateVersion : 0x02000000,
- NTLM_Unknown3 : 0x04000000,
- NTLM_Unknown2 : 0x08000000,
- NTLM_Unknown1 : 0x10000000,
- NTLM_Negotiate128 : 0x20000000,
- NTLM_NegotiateKeyExchange : 0x40000000,
- NTLM_Negotiate56 : 0x80000000
-};
-var typeflags = {
- NTLM_TYPE1_FLAGS : flags.NTLM_NegotiateUnicode
- + flags.NTLM_NegotiateOEM
- + flags.NTLM_RequestTarget
- + flags.NTLM_NegotiateNTLM
- + flags.NTLM_NegotiateOemDomainSupplied
- + flags.NTLM_NegotiateOemWorkstationSupplied
- + flags.NTLM_NegotiateAlwaysSign
- + flags.NTLM_NegotiateExtendedSecurity
- + flags.NTLM_NegotiateVersion
- + flags.NTLM_Negotiate128
- + flags.NTLM_Negotiate56,
-
- NTLM_TYPE2_FLAGS : flags.NTLM_NegotiateUnicode
- + flags.NTLM_RequestTarget
- + flags.NTLM_NegotiateNTLM
- + flags.NTLM_NegotiateAlwaysSign
- + flags.NTLM_NegotiateExtendedSecurity
- + flags.NTLM_NegotiateTargetInfo
- + flags.NTLM_NegotiateVersion
- + flags.NTLM_Negotiate128
- + flags.NTLM_Negotiate56
-};
-
-function createType1Message(options){
- var domain = escape(options.domain.toUpperCase());
- var workstation = escape(options.workstation.toUpperCase());
- var protocol = 'NTLMSSP\0';
-
- var BODY_LENGTH = 40;
-
- var type1flags = typeflags.NTLM_TYPE1_FLAGS;
- if(!domain || domain === '')
- type1flags = type1flags - flags.NTLM_NegotiateOemDomainSupplied;
-
- var pos = 0;
- var buf = new Buffer(BODY_LENGTH + domain.length + workstation.length);
-
-
- buf.write(protocol, pos, protocol.length); pos += protocol.length; // protocol
- buf.writeUInt32LE(1, pos); pos += 4; // type 1
- buf.writeUInt32LE(type1flags, pos); pos += 4; // TYPE1 flag
-
- buf.writeUInt16LE(domain.length, pos); pos += 2; // domain length
- buf.writeUInt16LE(domain.length, pos); pos += 2; // domain max length
- buf.writeUInt32LE(BODY_LENGTH + workstation.length, pos); pos += 4; // domain buffer offset
-
- buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation length
- buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation max length
- buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // workstation buffer offset
-
- buf.writeUInt8(5, pos); pos += 1; //ProductMajorVersion
- buf.writeUInt8(1, pos); pos += 1; //ProductMinorVersion
- buf.writeUInt16LE(2600, pos); pos += 2; //ProductBuild
-
- buf.writeUInt8(0 , pos); pos += 1; //VersionReserved1
- buf.writeUInt8(0 , pos); pos += 1; //VersionReserved2
- buf.writeUInt8(0 , pos); pos += 1; //VersionReserved3
- buf.writeUInt8(15, pos); pos += 1; //NTLMRevisionCurrent
-
- buf.write(workstation, pos, workstation.length, 'ascii'); pos += workstation.length; // workstation string
- buf.write(domain , pos, domain.length , 'ascii'); pos += domain.length;
-
- return 'NTLM ' + buf.toString('base64');
-}
-
-function parseType2Message(rawmsg, callback){
- var match = rawmsg.match(/NTLM (.+)?/);
- if(!match || !match[1])
- return callback(new Error("Couldn't find NTLM in the message type2 comming from the server"));
-
- var buf = new Buffer(match[1], 'base64');
-
- var msg = {};
-
- msg.signature = buf.slice(0, 8);
- msg.type = buf.readInt16LE(8);
-
- if(msg.type != 2)
- return callback(new Error("Server didn't return a type 2 message"));
-
- msg.targetNameLen = buf.readInt16LE(12);
- msg.targetNameMaxLen = buf.readInt16LE(14);
- msg.targetNameOffset = buf.readInt32LE(16);
- msg.targetName = buf.slice(msg.targetNameOffset, msg.targetNameOffset + msg.targetNameMaxLen);
-
- msg.negotiateFlags = buf.readInt32LE(20);
- msg.serverChallenge = buf.slice(24, 32);
- msg.reserved = buf.slice(32, 40);
-
- if(msg.negotiateFlags & flags.NTLM_NegotiateTargetInfo){
- msg.targetInfoLen = buf.readInt16LE(40);
- msg.targetInfoMaxLen = buf.readInt16LE(42);
- msg.targetInfoOffset = buf.readInt32LE(44);
- msg.targetInfo = buf.slice(msg.targetInfoOffset, msg.targetInfoOffset + msg.targetInfoLen);
- }
- return msg;
-}
-
-function createType3Message(msg2, options){
- var nonce = msg2.serverChallenge;
- var username = options.username;
- var password = options.password;
- var negotiateFlags = msg2.negotiateFlags;
-
- var isUnicode = negotiateFlags & flags.NTLM_NegotiateUnicode;
- var isNegotiateExtendedSecurity = negotiateFlags & flags.NTLM_NegotiateExtendedSecurity;
-
- var BODY_LENGTH = 72;
-
- var domainName = escape(options.domain.toUpperCase());
- var workstation = escape(options.workstation.toUpperCase());
-
- var workstationBytes, domainNameBytes, usernameBytes, encryptedRandomSessionKeyBytes;
-
- var encryptedRandomSessionKey = "";
- if(isUnicode){
- workstationBytes = new Buffer(workstation, 'utf16le');
- domainNameBytes = new Buffer(domainName, 'utf16le');
- usernameBytes = new Buffer(username, 'utf16le');
- encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'utf16le');
- }else{
- workstationBytes = new Buffer(workstation, 'ascii');
- domainNameBytes = new Buffer(domainName, 'ascii');
- usernameBytes = new Buffer(username, 'ascii');
- encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'ascii');
- }
-
- var lmChallengeResponse = calc_resp(create_LM_hashed_password_v1(password), nonce);
- var ntChallengeResponse = calc_resp(create_NT_hashed_password_v1(password), nonce);
-
- if(isNegotiateExtendedSecurity){
- var pwhash = create_NT_hashed_password_v1(password);
- var clientChallenge = "";
- for(var i=0; i < 8; i++){
- clientChallenge += String.fromCharCode( Math.floor(Math.random()*256) );
- }
- var clientChallengeBytes = new Buffer(clientChallenge, 'ascii');
- var challenges = ntlm2sr_calc_resp(pwhash, nonce, clientChallengeBytes);
- lmChallengeResponse = challenges.lmChallengeResponse;
- ntChallengeResponse = challenges.ntChallengeResponse;
- }
-
- var signature = 'NTLMSSP\0';
-
- var pos = 0;
- var buf = new Buffer(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length + encryptedRandomSessionKeyBytes.length);
-
- buf.write(signature, pos, signature.length); pos += signature.length;
- buf.writeUInt32LE(3, pos); pos += 4; // type 1
-
- buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseLen
- buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseMaxLen
- buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length, pos); pos += 4; // LmChallengeResponseOffset
-
- buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseLen
- buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseMaxLen
- buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length, pos); pos += 4; // NtChallengeResponseOffset
-
- buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameLen
- buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameMaxLen
- buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // DomainNameOffset
-
- buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameLen
- buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameMaxLen
- buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length, pos); pos += 4; // UserNameOffset
-
- buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationLen
- buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationMaxLen
- buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length, pos); pos += 4; // WorkstationOffset
-
- buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyLen
- buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyMaxLen
- buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length, pos); pos += 4; // EncryptedRandomSessionKeyOffset
-
- buf.writeUInt32LE(typeflags.NTLM_TYPE2_FLAGS, pos); pos += 4; // NegotiateFlags
-
- buf.writeUInt8(5, pos); pos++; // ProductMajorVersion
- buf.writeUInt8(1, pos); pos++; // ProductMinorVersion
- buf.writeUInt16LE(2600, pos); pos += 2; // ProductBuild
- buf.writeUInt8(0, pos); pos++; // VersionReserved1
- buf.writeUInt8(0, pos); pos++; // VersionReserved2
- buf.writeUInt8(0, pos); pos++; // VersionReserved3
- buf.writeUInt8(15, pos); pos++; // NTLMRevisionCurrent
-
- domainNameBytes.copy(buf, pos); pos += domainNameBytes.length;
- usernameBytes.copy(buf, pos); pos += usernameBytes.length;
- workstationBytes.copy(buf, pos); pos += workstationBytes.length;
- lmChallengeResponse.copy(buf, pos); pos += lmChallengeResponse.length;
- ntChallengeResponse.copy(buf, pos); pos += ntChallengeResponse.length;
- encryptedRandomSessionKeyBytes.copy(buf, pos); pos += encryptedRandomSessionKeyBytes.length;
-
- return 'NTLM ' + buf.toString('base64');
-}
-
-function create_LM_hashed_password_v1(password){
- // fix the password length to 14 bytes
- password = password.toUpperCase();
- var passwordBytes = new Buffer(password, 'ascii');
-
- var passwordBytesPadded = new Buffer(14);
- passwordBytesPadded.fill("\0");
- var sourceEnd = 14;
- if(passwordBytes.length < 14) sourceEnd = passwordBytes.length;
- passwordBytes.copy(passwordBytesPadded, 0, 0, sourceEnd);
-
- // split into 2 parts of 7 bytes:
- var firstPart = passwordBytesPadded.slice(0,7);
- var secondPart = passwordBytesPadded.slice(7);
-
- function encrypt(buf){
- var key = insertZerosEvery7Bits(buf);
- var des = crypto.createCipheriv('DES-ECB', key, '');
- return des.update("KGS!@#$%"); // page 57 in [MS-NLMP]);
- }
-
- var firstPartEncrypted = encrypt(firstPart);
- var secondPartEncrypted = encrypt(secondPart);
-
- return Buffer.concat([firstPartEncrypted, secondPartEncrypted]);
-}
-
-function insertZerosEvery7Bits(buf){
- var binaryArray = bytes2binaryArray(buf);
- var newBinaryArray = [];
- for(var i=0; i array.length)
- break;
-
- var binString1 = '' + array[i] + '' + array[i+1] + '' + array[i+2] + '' + array[i+3];
- var binString2 = '' + array[i+4] + '' + array[i+5] + '' + array[i+6] + '' + array[i+7];
- var hexchar1 = binary2hex[binString1];
- var hexchar2 = binary2hex[binString2];
-
- var buf = new Buffer(hexchar1 + '' + hexchar2, 'hex');
- bufArray.push(buf);
- }
-
- return Buffer.concat(bufArray);
-}
-
-function create_NT_hashed_password_v1(password){
- var buf = new Buffer(password, 'utf16le');
- var md4 = crypto.createHash('md4');
- md4.update(buf);
- return new Buffer(md4.digest());
-}
-
-function calc_resp(password_hash, server_challenge){
- // padding with zeros to make the hash 21 bytes long
- var passHashPadded = new Buffer(21);
- passHashPadded.fill("\0");
- password_hash.copy(passHashPadded, 0, 0, password_hash.length);
-
- var resArray = [];
-
- var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(0,7)), '');
- resArray.push( des.update(server_challenge.slice(0,8)) );
-
- des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), '');
- resArray.push( des.update(server_challenge.slice(0,8)) );
-
- des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), '');
- resArray.push( des.update(server_challenge.slice(0,8)) );
-
- return Buffer.concat(resArray);
-}
-
-function ntlm2sr_calc_resp(responseKeyNT, serverChallenge, clientChallenge){
- // padding with zeros to make the hash 16 bytes longer
- var lmChallengeResponse = new Buffer(clientChallenge.length + 16);
- lmChallengeResponse.fill("\0");
- clientChallenge.copy(lmChallengeResponse, 0, 0, clientChallenge.length);
-
- var buf = Buffer.concat([serverChallenge, clientChallenge]);
- var md5 = crypto.createHash('md5');
- md5.update(buf);
- var sess = md5.digest();
- var ntChallengeResponse = calc_resp(responseKeyNT, sess.slice(0,8));
-
- return {
- lmChallengeResponse: lmChallengeResponse,
- ntChallengeResponse: ntChallengeResponse
- };
-}
-
-exports.createType1Message = createType1Message;
-exports.parseType2Message = parseType2Message;
-exports.createType3Message = createType3Message;
-
-
-
diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt b/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt
deleted file mode 100644
index 39765da..0000000
--- a/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-// This software (ntlm.js) was copied from a file of the same name at https://github.com/SamDecrock/node-http-ntlm/blob/master/ntlm.js.
-//
-// As of this writing, it is a part of the node-http-ntlm module produced by SamDecrock.
-//
-// It is used as a part of the NTLM support provided by the vso-node-api library.
-//
diff --git a/node_modules/typed-rest-client/package.json b/node_modules/typed-rest-client/package.json
index dd26336..d4b38bf 100644
--- a/node_modules/typed-rest-client/package.json
+++ b/node_modules/typed-rest-client/package.json
@@ -1,31 +1,31 @@
{
"_args": [
[
- "typed-rest-client@1.7.1",
+ "typed-rest-client@1.7.2",
"/home/runner/work/ghaction-upx/ghaction-upx"
]
],
- "_from": "typed-rest-client@1.7.1",
- "_id": "typed-rest-client@1.7.1",
+ "_from": "typed-rest-client@1.7.2",
+ "_id": "typed-rest-client@1.7.2",
"_inBundle": false,
- "_integrity": "sha512-fZRDWFtUp3J2E0jOiCJYZ9LDrYZHpjY95su//ekqXERS7C1qojP6movh7M4JGURJnBuTVsO0g2N4vEoW5o3Djw==",
+ "_integrity": "sha512-6ENgPdTH7s2Xcd6mBaahyMLBoXPi0LNe75E1T0RFOdhqN9ENpZmf3P5iloOlJUDaHYrucPPzMrBybr6BdS2URg==",
"_location": "/typed-rest-client",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "typed-rest-client@1.7.1",
+ "raw": "typed-rest-client@1.7.2",
"name": "typed-rest-client",
"escapedName": "typed-rest-client",
- "rawSpec": "1.7.1",
+ "rawSpec": "1.7.2",
"saveSpec": null,
- "fetchSpec": "1.7.1"
+ "fetchSpec": "1.7.2"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.7.1.tgz",
- "_spec": "1.7.1",
+ "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.7.2.tgz",
+ "_spec": "1.7.2",
"_where": "/home/runner/work/ghaction-upx/ghaction-upx",
"author": {
"name": "Microsoft Corporation"
@@ -35,7 +35,7 @@
},
"dependencies": {
"qs": "^6.9.1",
- "tunnel": "0.0.4",
+ "tunnel": "0.0.6",
"underscore": "1.8.3"
},
"description": "Node Rest and Http Clients for use with TypeScript",
@@ -73,5 +73,5 @@
"units": "node make.js units",
"validate": "node make.js validate"
},
- "version": "1.7.1"
+ "version": "1.7.2"
}