File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,13 @@ if (!common.hasCrypto)
2626 common . skip ( 'missing crypto' ) ;
2727
2828const assert = require ( 'assert' ) ;
29-
3029const tls = require ( 'tls' ) ;
3130
32- const fs = require ( 'fs ' ) ;
31+ const fixtures = require ( '../common/fixtures ' ) ;
3332
34- const dir = common . fixturesDir ;
35- const options = { key : fs . readFileSync ( `${ dir } /test_key.pem` ) ,
36- cert : fs . readFileSync ( `${ dir } /test_cert.pem` ) ,
37- ca : [ fs . readFileSync ( `${ dir } /test_ca.pem` ) ] } ;
33+ const options = { key : fixtures . readSync ( 'test_key.pem' ) ,
34+ cert : fixtures . readSync ( 'test_cert.pem' ) ,
35+ ca : [ fixtures . readSync ( 'test_ca.pem' ) ] } ;
3836
3937const writes = [
4038 'some server data' ,
Original file line number Diff line number Diff line change @@ -26,14 +26,15 @@ if (!common.hasCrypto)
2626 common . skip ( 'missing crypto' ) ;
2727
2828const assert = require ( 'assert' ) ;
29- const fs = require ( 'fs' ) ;
3029const tls = require ( 'tls' ) ;
3130
31+ const fixtures = require ( '../common/fixtures' ) ;
32+
3233let received = '' ;
3334
3435const server = tls . createServer ( {
35- key : fs . readFileSync ( ` ${ common . fixturesDir } /keys/ agent1-key.pem` ) ,
36- cert : fs . readFileSync ( ` ${ common . fixturesDir } /keys/ agent1-cert.pem` )
36+ key : fixtures . readKey ( ' agent1-key.pem' ) ,
37+ cert : fixtures . readKey ( ' agent1-cert.pem' )
3738} , common . mustCall ( function ( c ) {
3839 c . _write ( 'hello ' , null , common . mustCall ( function ( ) {
3940 c . _write ( 'world!' , null , common . mustCall ( function ( ) {
You can’t perform that action at this time.
0 commit comments