Skip to content

Commit

Permalink
force cipher AES128-GCM-SHA256 in https tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Judeaux committed Apr 2, 2015
1 parent 1dabda2 commit c33d161
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/lib-https-proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('lib/http-proxy.js', function() {
ssl: {
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
}
}).listen(ports.proxy);

Expand Down Expand Up @@ -65,6 +66,7 @@ describe('lib/http-proxy.js', function() {
var source = https.createServer({
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
}, function (req, res) {
expect(req.method).to.eql('GET');
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
Expand Down Expand Up @@ -105,6 +107,7 @@ describe('lib/http-proxy.js', function() {
var source = https.createServer({
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
}, function(req, res) {
expect(req.method).to.eql('GET');
expect(req.headers.host.split(':')[1]).to.eql(ports.proxy);
Expand All @@ -119,6 +122,7 @@ describe('lib/http-proxy.js', function() {
ssl: {
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
},
secure: false
}).listen(ports.proxy);
Expand Down Expand Up @@ -150,6 +154,7 @@ describe('lib/http-proxy.js', function() {
var source = https.createServer({
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
}).listen(ports.source);

var proxy = httpProxy.createProxyServer({
Expand Down Expand Up @@ -191,6 +196,7 @@ describe('lib/http-proxy.js', function() {
var ownServer = https.createServer({
key: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-key.pem')),
cert: fs.readFileSync(path.join(__dirname, 'fixtures', 'agent2-cert.pem')),
ciphers: 'AES128-GCM-SHA256',
}, function (req, res) {
proxy.web(req, res, {
target: 'http://127.0.0.1:' + ports.source
Expand Down

0 comments on commit c33d161

Please sign in to comment.