@@ -35,6 +35,7 @@ describe('lib/http-proxy.js', function() {
35
35
ssl : {
36
36
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
37
37
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
38
+ ciphers : 'AES128-GCM-SHA256' ,
38
39
}
39
40
} ) . listen ( ports . proxy ) ;
40
41
@@ -65,6 +66,7 @@ describe('lib/http-proxy.js', function() {
65
66
var source = https . createServer ( {
66
67
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
67
68
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
69
+ ciphers : 'AES128-GCM-SHA256' ,
68
70
} , function ( req , res ) {
69
71
expect ( req . method ) . to . eql ( 'GET' ) ;
70
72
expect ( req . headers . host . split ( ':' ) [ 1 ] ) . to . eql ( ports . proxy ) ;
@@ -105,6 +107,7 @@ describe('lib/http-proxy.js', function() {
105
107
var source = https . createServer ( {
106
108
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
107
109
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
110
+ ciphers : 'AES128-GCM-SHA256' ,
108
111
} , function ( req , res ) {
109
112
expect ( req . method ) . to . eql ( 'GET' ) ;
110
113
expect ( req . headers . host . split ( ':' ) [ 1 ] ) . to . eql ( ports . proxy ) ;
@@ -119,6 +122,7 @@ describe('lib/http-proxy.js', function() {
119
122
ssl : {
120
123
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
121
124
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
125
+ ciphers : 'AES128-GCM-SHA256' ,
122
126
} ,
123
127
secure : false
124
128
} ) . listen ( ports . proxy ) ;
@@ -150,6 +154,7 @@ describe('lib/http-proxy.js', function() {
150
154
var source = https . createServer ( {
151
155
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
152
156
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
157
+ ciphers : 'AES128-GCM-SHA256' ,
153
158
} ) . listen ( ports . source ) ;
154
159
155
160
var proxy = httpProxy . createProxyServer ( {
@@ -161,7 +166,11 @@ describe('lib/http-proxy.js', function() {
161
166
162
167
proxy . on ( 'error' , function ( err , req , res ) {
163
168
expect ( err ) . to . be . an ( Error ) ;
164
- expect ( err . toString ( ) ) . to . be ( 'Error: DEPTH_ZERO_SELF_SIGNED_CERT' )
169
+ if ( process . versions . node . indexOf ( '0.12.' ) == 0 ) {
170
+ expect ( err . toString ( ) ) . to . be ( 'Error: self signed certificate' )
171
+ } else {
172
+ expect ( err . toString ( ) ) . to . be ( 'Error: DEPTH_ZERO_SELF_SIGNED_CERT' )
173
+ }
165
174
done ( ) ;
166
175
} )
167
176
@@ -191,6 +200,7 @@ describe('lib/http-proxy.js', function() {
191
200
var ownServer = https . createServer ( {
192
201
key : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-key.pem' ) ) ,
193
202
cert : fs . readFileSync ( path . join ( __dirname , 'fixtures' , 'agent2-cert.pem' ) ) ,
203
+ ciphers : 'AES128-GCM-SHA256' ,
194
204
} , function ( req , res ) {
195
205
proxy . web ( req , res , {
196
206
target : 'http://127.0.0.1:' + ports . source
0 commit comments