File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ const common = require('../common');
3
3
if ( ! common . hasCrypto )
4
4
common . skip ( 'missing crypto' ) ;
5
5
6
+ // This test ensures that `getProtocol` returns the right protocol
7
+ // from a TLS connection
8
+
6
9
const assert = require ( 'assert' ) ;
7
10
const tls = require ( 'tls' ) ;
8
- const fs = require ( 'fs ' ) ;
11
+ const fixtures = require ( '../common/fixtures ' ) ;
9
12
10
13
const clientConfigs = [
11
14
{ secureProtocol : 'TLSv1_method' , version : 'TLSv1' } ,
@@ -14,8 +17,8 @@ const clientConfigs = [
14
17
] ;
15
18
16
19
const serverConfig = {
17
- key : fs . readFileSync ( ` ${ common . fixturesDir } /keys/agent2-key.pem` ) ,
18
- cert : fs . readFileSync ( ` ${ common . fixturesDir } /keys/agent2-cert.pem` )
20
+ key : fixtures . readSync ( ' /keys/agent2-key.pem' ) ,
21
+ cert : fixtures . readSync ( ' /keys/agent2-cert.pem' )
19
22
} ;
20
23
21
24
const server = tls . createServer ( serverConfig , common . mustCall ( function ( ) {
You can’t perform that action at this time.
0 commit comments