Browse Source

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>
v9.x-staging
Ben Michel 7 years ago
committed by Ruben Bridgewater
parent
commit
17857d4fc9
No known key found for this signature in database GPG Key ID: F07496B3EB3C1762
  1. 7
      test/parallel/test-tls-max-send-fragment.js

7
test/parallel/test-tls-max-send-fragment.js

@ -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…
Cancel
Save