File tree 1 file changed +7
-5
lines changed 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const common = require ( '../common' ) ;
3
+
3
4
if ( ! common . hasCrypto )
4
5
common . skip ( 'missing crypto' ) ;
5
6
7
+ const fixtures = require ( '../common/fixtures' ) ;
8
+
6
9
const assert = require ( 'assert' ) ;
7
- const tls = require ( 'tls' ) ;
8
- const stream = require ( 'stream' ) ;
9
- const fs = require ( 'fs' ) ;
10
10
const net = require ( 'net' ) ;
11
+ const stream = require ( 'stream' ) ;
12
+ const tls = require ( 'tls' ) ;
11
13
12
14
const connected = {
13
15
client : 0 ,
14
16
server : 0
15
17
} ;
16
18
17
19
const server = tls . createServer ( {
18
- key : fs . readFileSync ( ` ${ common . fixturesDir } /keys/ agent1-key.pem` ) ,
19
- cert : fs . readFileSync ( ` ${ common . fixturesDir } /keys/ agent1-cert.pem` )
20
+ key : fixtures . readKey ( ' agent1-key.pem' ) ,
21
+ cert : fixtures . readKey ( ' agent1-cert.pem' )
20
22
} , function ( c ) {
21
23
console . log ( 'new client' ) ;
22
24
connected . server ++ ;
You can’t perform that action at this time.
0 commit comments