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

test: move all test keys/certs under test/fixtures/keys/ #27962

Closed
Closed
Show file tree
Hide file tree
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
10 changes: 4 additions & 6 deletions benchmark/tls/secure-pair.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ const bench = common.createBenchmark(main, {
size: [2, 1024, 1024 * 1024]
});

const fs = require('fs');
const fixtures = require('../../test/common/fixtures');
const tls = require('tls');
const net = require('net');
const path = require('path');

const cert_dir = path.resolve(__dirname, '../../test/fixtures');
const REDIRECT_PORT = 28347;

function main({ dur, size, securing }) {
const chunk = Buffer.alloc(size, 'b');

const options = {
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
cert: fs.readFileSync(`${cert_dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ],
key: fixtures.readKey('rsa_private.pem'),
cert: fixtures.readKey('rsa_cert.crt'),
ca: fixtures.readKey('rsa_ca.crt'),
ciphers: 'AES256-GCM-SHA384',
isServer: true,
requestCert: true,
Expand Down
10 changes: 4 additions & 6 deletions benchmark/tls/throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ const bench = common.createBenchmark(main, {
size: [2, 1024, 1024 * 1024]
});

const path = require('path');
const fs = require('fs');
const cert_dir = path.resolve(__dirname, '../../test/fixtures');
const fixtures = require('../../test/common/fixtures');
var options;
const tls = require('tls');

Expand All @@ -32,9 +30,9 @@ function main({ dur, type, size }) {
}

options = {
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
cert: fs.readFileSync(`${cert_dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ],
key: fixtures.readKey('rsa_private.pem'),
cert: fixtures.readKey('rsa_cert.crt'),
ca: fixtures.readKey('rsa_ca.crt'),
ciphers: 'AES256-GCM-SHA384'
};

Expand Down
10 changes: 4 additions & 6 deletions benchmark/tls/tls-connect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
const fs = require('fs');
const path = require('path');
const fixtures = require('../../test/common/fixtures');
const tls = require('tls');

const common = require('../common.js');
Expand All @@ -18,11 +17,10 @@ var running = true;
function main(conf) {
dur = conf.dur;
concurrency = conf.concurrency;
const cert_dir = path.resolve(__dirname, '../../test/fixtures');
const options = {
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
cert: fs.readFileSync(`${cert_dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ],
key: fixtures.readKey('rsa_private.pem'),
cert: fixtures.readKey('rsa_cert.crt'),
ca: fixtures.readKey('rsa_ca.crt'),
ciphers: 'AES256-GCM-SHA384'
};

Expand Down
4 changes: 2 additions & 2 deletions test/async-hooks/test-graph.tls-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ hooks.enable();
//
const server = tls
.createServer({
cert: fixtures.readSync('test_cert.pem'),
key: fixtures.readSync('test_key.pem')
cert: fixtures.readKey('rsa_cert.crt'),
key: fixtures.readKey('rsa_private.pem')
})
.on('listening', common.mustCall(onlistening))
.on('secureConnection', common.mustCall(onsecureConnection))
Expand Down
4 changes: 2 additions & 2 deletions test/async-hooks/test-tlswrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ tls.DEFAULT_MAX_VERSION = 'TLSv1.2';
//
const server = tls
.createServer({
cert: fixtures.readSync('test_cert.pem'),
key: fixtures.readSync('test_key.pem')
cert: fixtures.readKey('rsa_cert.crt'),
key: fixtures.readKey('rsa_private.pem')
})
.on('listening', common.mustCall(onlistening))
.on('secureConnection', common.mustCall(onsecureConnection))
Expand Down
21 changes: 0 additions & 21 deletions test/fixtures/agent.crt

This file was deleted.

27 changes: 0 additions & 27 deletions test/fixtures/agent.key

This file was deleted.

24 changes: 0 additions & 24 deletions test/fixtures/alice.crt

This file was deleted.

35 changes: 0 additions & 35 deletions test/fixtures/cert.pem

This file was deleted.

25 changes: 0 additions & 25 deletions test/fixtures/foafssl.crt

This file was deleted.

32 changes: 0 additions & 32 deletions test/fixtures/foafssl.key

This file was deleted.

4 changes: 4 additions & 0 deletions test/fixtures/keys/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* -text

Makefile text
*.cnf text
Binary file not shown.
Loading