Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tls hello parser failure test to use fixtures.readSync. #16816

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/parallel/test-tls-hello-parser-failure.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
'use strict';

const common = require('../common');
const fixtures = require('../common/fixtures');

// This test ensures that the tls parser causes a client error if the client
// sends invalid data.

if (!common.hasCrypto)
common.skip('missing crypto');
Expand All @@ -30,11 +34,10 @@ const assert = require('assert');
const tls = require('tls');

const net = require('net');
const fs = require('fs');

const options = {
key: fs.readFileSync(`${common.fixturesDir}/test_key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/test_cert.pem`)
key: fixtures.readSync('test_key.pem'),
cert: fixtures.readSync('test_cert.pem')
};

const bonkers = Buffer.alloc(1024 * 1024, 42);
Expand Down