@@ -26,7 +26,7 @@ var crypto = process.binding('crypto');
2626var common = require ( '../common' ) ;
2727var fs = require ( 'fs' ) ;
2828
29- var V1038Ciphers = tls . getLegacyCiphers ( 'v0.10.38 ' ) ;
29+ var V1038Ciphers = tls . getLegacyCiphers ( 'v0.10.40 ' ) ;
3030
3131function doTest ( checklist , additional_args , env ) {
3232 var options ;
@@ -54,53 +54,53 @@ function doTestPrecedence() {
5454 // test that --enable-legacy-cipher-list takes precedence
5555 // over NODE_CIPHER_LIST
5656 doTest ( V1038Ciphers ,
57- [ '--enable-legacy-cipher-list=v0.10.38 ' ] ,
57+ [ '--enable-legacy-cipher-list=v0.10.40 ' ] ,
5858 { 'NODE_CIPHER_LIST' : 'XYZ' } ) ;
5959
6060 // test that --cipher-list takes precedence over NODE_LEGACY_CIPHER_LIST
6161 doTest ( 'ABC' ,
6262 [ '--cipher-list=ABC' ] ,
63- { 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.38 ' } ) ;
63+ { 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.40 ' } ) ;
6464
6565 // test that --enable-legacy-cipher-list takes precence over both envars
6666 // note: in this release, there's only one legal value for the legacy
6767 // switch so this test is largely a non-op. When multiple values
6868 // are supported, this test should be changed to test that the
6969 // command line switch actually does override
7070 doTest ( V1038Ciphers ,
71- [ '--enable-legacy-cipher-list=v0.10.38 ' ] ,
71+ [ '--enable-legacy-cipher-list=v0.10.40 ' ] ,
7272 {
73- 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.38 ' ,
73+ 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.40 ' ,
7474 'NODE_CIPHER_LIST' : 'XYZ'
7575 } ) ;
7676
7777 // test the right-most command line option takes precedence
7878 doTest ( V1038Ciphers ,
7979 [
8080 '--cipher-list=XYZ' ,
81- '--enable-legacy-cipher-list=v0.10.38 '
81+ '--enable-legacy-cipher-list=v0.10.40 '
8282 ] ) ;
8383
8484 // test the right-most command line option takes precedence
8585 doTest ( 'XYZ' ,
8686 [
87- '--enable-legacy-cipher-list=v0.10.38 ' ,
87+ '--enable-legacy-cipher-list=v0.10.40 ' ,
8888 '--cipher-list=XYZ'
8989 ] ) ;
9090
9191 // test the right-most command line option takes precedence
9292 doTest ( 'XYZ' ,
9393 [
9494 '--cipher-list=ABC' ,
95- '--enable-legacy-cipher-list=v0.10.38 ' ,
95+ '--enable-legacy-cipher-list=v0.10.40 ' ,
9696 '--cipher-list=XYZ'
9797 ] ) ;
9898
9999 // test that NODE_LEGACY_CIPHER_LIST takes precedence over
100100 // NODE_CIPHER_LIST
101101 doTest ( V1038Ciphers , [ ] ,
102102 {
103- 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.38 ' ,
103+ 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.40 ' ,
104104 'NODE_CIPHER_LIST' : 'ABC'
105105 } ) ;
106106}
@@ -115,7 +115,7 @@ doTest('ABC', [], {'NODE_CIPHER_LIST':'ABC'});
115115doTest ( 'ABC' , [ '--cipher-list=ABC' ] ) ;
116116
117117// Test the --enable-legacy-cipher-list and NODE_LEGACY_CIPHER_LIST envar
118- [ 'v0.10.38 ' ] . forEach ( function ( arg ) {
118+ [ 'v0.10.40 ' ] . forEach ( function ( arg ) {
119119 var checklist = tls . getLegacyCiphers ( arg ) ;
120120 // command line switch
121121 doTest ( checklist , [ '--enable-legacy-cipher-list=' + arg ] ) ;
@@ -136,11 +136,11 @@ assert.throws(function() {tls.getLegacyCiphers(1);}, TypeError);
136136// too many parameters
137137assert . throws ( function ( ) { tls . getLegacyCiphers ( 'abc' , 'extra' ) ; } , TypeError ) ;
138138// ah, just right
139- assert . doesNotThrow ( function ( ) { tls . getLegacyCiphers ( 'v0.10.38 ' ) ; } ) ;
139+ assert . doesNotThrow ( function ( ) { tls . getLegacyCiphers ( 'v0.10.40 ' ) ; } ) ;
140140
141- // Test to ensure default ciphers are not set when v0.10.38 legacy cipher
141+ // Test to ensure default ciphers are not set when v0.10.40 legacy cipher
142142// switch is used. This is a bit involved... we need to first set up the
143- // TLS server, then spawn a second node instance using the v0.10.38 cipher,
143+ // TLS server, then spawn a second node instance using the v0.10.40 cipher,
144144// then connect and check to make sure the options are correct. Since there
145145// is no direct way of testing it, an alternate createCredentials shim is
146146// created that intercepts the call to createCredentials and checks the
@@ -159,7 +159,7 @@ var fail_if_default_ciphers_set = (
159159 require ( 'crypto' ) . createCredentials = function ( options ) {
160160 used_monkey_patch = true ;
161161 // since node was started with the --enable-legacy-cipher-list
162- // switch equal to v0.10.38 , the options.ciphers should be
162+ // switch equal to v0.10.40 , the options.ciphers should be
163163 // undefined. If it's not undefined, we have a problem and
164164 // the test fails
165165 if ( options . ciphers !== undefined ) {
@@ -253,19 +253,19 @@ var server = tls.Server(options, function(socket) {
253253server . listen ( common . PORT , function ( ) {
254254 // checks to make sure the default ciphers are *not* set
255255 // because the --enable-legacy-cipher-list switch is set to
256- // v0.10.38
256+ // v0.10.40
257257 doDefaultCipherTest ( fail_if_default_ciphers_set ,
258- [ '--enable-legacy-cipher-list=v0.10.38 ' ] ) ;
258+ [ '--enable-legacy-cipher-list=v0.10.40 ' ] ) ;
259259
260260 // checks to make sure the default ciphers are *not* set
261- // because the NODE_LEGACY_CIPHER_LIST envar is set to v0.10.38
261+ // because the NODE_LEGACY_CIPHER_LIST envar is set to v0.10.40
262262 doDefaultCipherTest ( fail_if_default_ciphers_set ,
263- [ ] , { 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.38 ' } ) ;
263+ [ ] , { 'NODE_LEGACY_CIPHER_LIST' : 'v0.10.40 ' } ) ;
264264
265265 // this variant checks to ensure that the default cipher list IS set
266266 doDefaultCipherTest ( fail_if_default_ciphers_not_set , [ ] , { } ) ;
267267
268- // test that setting the cipher list explicitly to the v0.10.38
268+ // test that setting the cipher list explicitly to the v0.10.40
269269 // string without using the legacy cipher switch causes the
270270 // default ciphers to be set.
271271 doDefaultCipherTest ( fail_if_default_ciphers_not_set ,
0 commit comments