File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 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');
33if ( ! common . hasCrypto )
44 common . skip ( 'missing crypto' ) ;
55
6+ // This test ensures that `getProtocol` returns the right protocol
7+ // from a TLS connection
8+
69const assert = require ( 'assert' ) ;
710const tls = require ( 'tls' ) ;
8- const fs = require ( 'fs ' ) ;
11+ const fixtures = require ( '../common/fixtures ' ) ;
912
1013const clientConfigs = [
1114 { secureProtocol : 'TLSv1_method' , version : 'TLSv1' } ,
@@ -14,8 +17,8 @@ const clientConfigs = [
1417] ;
1518
1619const 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' )
1922} ;
2023
2124const server = tls . createServer ( serverConfig , common . mustCall ( function ( ) {
You can’t perform that action at this time.
0 commit comments