File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33const common = require ( '../common' ) ;
4+ const fixtures = require ( '../common/fixtures' ) ;
45
56if ( ! common . hasCrypto )
67 common . skip ( 'missing crypto' ) ;
78
89const { strictEqual } = require ( 'assert' ) ;
9- const { join } = require ( 'path' ) ;
10- const { readFileSync } = require ( 'fs' ) ;
1110const { createSecureContext } = require ( 'tls' ) ;
1211const { createSecureServer, connect } = require ( 'http2' ) ;
1312const { get } = require ( 'https' ) ;
@@ -16,13 +15,9 @@ const { connect: tls } = require('tls');
1615
1716const countdown = ( count , done ) => ( ) => -- count === 0 && done ( ) ;
1817
19- function loadKey ( keyname ) {
20- return readFileSync ( join ( common . fixturesDir , 'keys' , keyname ) ) ;
21- }
22-
23- const key = loadKey ( 'agent8-key.pem' ) ;
24- const cert = loadKey ( 'agent8-cert.pem' ) ;
25- const ca = loadKey ( 'fake-startcom-root-cert.pem' ) ;
18+ const key = fixtures . readKey ( 'agent8-key.pem' ) ;
19+ const cert = fixtures . readKey ( 'agent8-cert.pem' ) ;
20+ const ca = fixtures . readKey ( 'fake-startcom-root-cert.pem' ) ;
2621
2722const clientOptions = { secureContext : createSecureContext ( { ca } ) } ;
2823
You can’t perform that action at this time.
0 commit comments