| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 23967b2 commit 92b29cd
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,15 +26,13 @@ if (!common.hasCrypto) | |||
| 26 | 26 | common.skip('missing crypto'); | |
| 27 | 27 | ||
| 28 | 28 | const assert = require('assert'); | |
| 29 | - | ||
| 30 | 29 | const tls = require('tls'); | |
| 31 | 30 | ||
| 32 | - const fs = require('fs'); | ||
| 31 | + const fixtures = require('../common/fixtures'); | ||
| 33 | 32 | ||
| 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') ] }; | ||
| 38 | 36 | ||
| 39 | 37 | const writes = [ | |
| 40 | 38 | 'some server data', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,14 +26,15 @@ if (!common.hasCrypto) | |||
| 26 | 26 | common.skip('missing crypto'); | |
| 27 | 27 | ||
| 28 | 28 | const assert = require('assert'); | |
| 29 | - const fs = require('fs'); | ||
| 30 | 29 | const tls = require('tls'); | |
| 31 | 30 | ||
| 31 | + const fixtures = require('../common/fixtures'); | ||
| 32 | + | ||
| 32 | 33 | let received = ''; | |
| 33 | 34 | ||
| 34 | 35 | const 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') | ||
| 37 | 38 | }, common.mustCall(function(c) { | |
| 38 | 39 | c._write('hello ', null, common.mustCall(function() { | |
| 39 | 40 | c._write('world!', null, common.mustCall(function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments