test: use common.fixtures in tls test
PR-URL: https://github.com/nodejs/node/pull/15965 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
3953164e42
commit
17857d4fc9
@ -21,20 +21,21 @@
|
||||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const fixtures = require('../common/fixtures');
|
||||
|
||||
if (!common.hasCrypto)
|
||||
common.skip('missing crypto');
|
||||
|
||||
const assert = require('assert');
|
||||
const tls = require('tls');
|
||||
const fs = require('fs');
|
||||
|
||||
const buf = Buffer.allocUnsafe(10000);
|
||||
let received = 0;
|
||||
const maxChunk = 768;
|
||||
|
||||
const server = tls.createServer({
|
||||
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
|
||||
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
|
||||
key: fixtures.readKey('agent1-key.pem'),
|
||||
cert: fixtures.readKey('agent1-cert.pem')
|
||||
}, function(c) {
|
||||
// Lower and upper limits
|
||||
assert(!c.setMaxSendFragment(511));
|
||||
|
Loading…
x
Reference in New Issue
Block a user