@@ -25,16 +25,16 @@ const common = require('../common');
25
25
if ( ! common . hasCrypto )
26
26
common . skip ( 'missing crypto' ) ;
27
27
28
+ const fixtures = require ( '../common/fixtures' ) ;
29
+
28
30
const assert = require ( 'assert' ) ;
29
- const fs = require ( 'fs' ) ;
30
- const path = require ( 'path' ) ;
31
31
const tls = require ( 'tls' ) ;
32
32
33
33
// https://github.com/joyent/node/issues/1218
34
34
// uncatchable exception on TLS connection error
35
35
{
36
- const cert = fs . readFileSync ( path . join ( common . fixturesDir , 'test_cert.pem' ) ) ;
37
- const key = fs . readFileSync ( path . join ( common . fixturesDir , 'test_key.pem' ) ) ;
36
+ const cert = fixtures . readSync ( 'test_cert.pem' ) ;
37
+ const key = fixtures . readSync ( 'test_key.pem' ) ;
38
38
39
39
const options = { cert : cert , key : key , port : common . PORT } ;
40
40
const conn = tls . connect ( options , common . mustNotCall ( ) ) ;
@@ -47,8 +47,8 @@ const tls = require('tls');
47
47
48
48
// SSL_accept/SSL_connect error handling
49
49
{
50
- const cert = fs . readFileSync ( path . join ( common . fixturesDir , 'test_cert.pem' ) ) ;
51
- const key = fs . readFileSync ( path . join ( common . fixturesDir , 'test_key.pem' ) ) ;
50
+ const cert = fixtures . readSync ( 'test_cert.pem' ) ;
51
+ const key = fixtures . readSync ( 'test_key.pem' ) ;
52
52
53
53
const conn = tls . connect ( {
54
54
cert : cert ,
0 commit comments