Skip to content

Commit f9ddcc6

Browse files
reasonablytallBridgeAR
authored andcommitted
test: remove pass-* certs
PR-URL: #27962 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent e673b57 commit f9ddcc6

File tree

5 files changed

+13
-67
lines changed

5 files changed

+13
-67
lines changed

test/fixtures/pass-cert.pem

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/fixtures/pass-csr.pem

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/fixtures/pass-key.pem

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/fixtures/raw-key.pem

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/parallel/test-tls-passphrase.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const assert = require('assert');
2828
const tls = require('tls');
2929
const fixtures = require('../common/fixtures');
3030

31-
const passKey = fixtures.readSync('pass-key.pem');
32-
const rawKey = fixtures.readSync('raw-key.pem');
33-
const cert = fixtures.readSync('pass-cert.pem');
31+
const passKey = fixtures.readKey('rsa_private_encrypted.pem');
32+
const rawKey = fixtures.readKey('rsa_private.pem');
33+
const cert = fixtures.readKey('rsa_cert.crt');
3434

3535
assert(Buffer.isBuffer(passKey));
3636
assert(Buffer.isBuffer(cert));
@@ -39,7 +39,7 @@ assert.strictEqual(typeof cert.toString(), 'string');
3939

4040
const server = tls.Server({
4141
key: passKey,
42-
passphrase: 'passphrase',
42+
passphrase: 'password',
4343
cert: cert,
4444
ca: [cert],
4545
requestCert: true,
@@ -53,7 +53,7 @@ server.listen(0, common.mustCall(function() {
5353
tls.connect({
5454
port: this.address().port,
5555
key: passKey,
56-
passphrase: 'passphrase',
56+
passphrase: 'password',
5757
cert: cert,
5858
rejectUnauthorized: false
5959
}, common.mustCall());
@@ -77,7 +77,7 @@ server.listen(0, common.mustCall(function() {
7777
tls.connect({
7878
port: this.address().port,
7979
key: [passKey],
80-
passphrase: 'passphrase',
80+
passphrase: 'password',
8181
cert: [cert],
8282
rejectUnauthorized: false
8383
}, common.mustCall());
@@ -101,7 +101,7 @@ server.listen(0, common.mustCall(function() {
101101
tls.connect({
102102
port: this.address().port,
103103
key: passKey.toString(),
104-
passphrase: 'passphrase',
104+
passphrase: 'password',
105105
cert: cert.toString(),
106106
rejectUnauthorized: false
107107
}, common.mustCall());
@@ -125,7 +125,7 @@ server.listen(0, common.mustCall(function() {
125125
tls.connect({
126126
port: this.address().port,
127127
key: [passKey.toString()],
128-
passphrase: 'passphrase',
128+
passphrase: 'password',
129129
cert: [cert.toString()],
130130
rejectUnauthorized: false
131131
}, common.mustCall());
@@ -148,14 +148,14 @@ server.listen(0, common.mustCall(function() {
148148
// Object[]
149149
tls.connect({
150150
port: this.address().port,
151-
key: [{ pem: passKey, passphrase: 'passphrase' }],
151+
key: [{ pem: passKey, passphrase: 'password' }],
152152
cert: cert,
153153
rejectUnauthorized: false
154154
}, common.mustCall());
155155

156156
tls.connect({
157157
port: this.address().port,
158-
key: [{ pem: passKey, passphrase: 'passphrase' }],
158+
key: [{ pem: passKey, passphrase: 'password' }],
159159
passphrase: 'ignored',
160160
cert: cert,
161161
rejectUnauthorized: false
@@ -164,14 +164,14 @@ server.listen(0, common.mustCall(function() {
164164
tls.connect({
165165
port: this.address().port,
166166
key: [{ pem: passKey }],
167-
passphrase: 'passphrase',
167+
passphrase: 'password',
168168
cert: cert,
169169
rejectUnauthorized: false
170170
}, common.mustCall());
171171

172172
tls.connect({
173173
port: this.address().port,
174-
key: [{ pem: passKey.toString(), passphrase: 'passphrase' }],
174+
key: [{ pem: passKey.toString(), passphrase: 'password' }],
175175
cert: cert,
176176
rejectUnauthorized: false
177177
}, common.mustCall());
@@ -288,7 +288,7 @@ assert.throws(function() {
288288
tls.connect({
289289
port: server.address().port,
290290
key: [{ pem: passKey, passphrase: 'invalid' }],
291-
passphrase: 'passphrase', // Valid but unused
291+
passphrase: 'password', // Valid but unused
292292
cert: cert,
293293
rejectUnauthorized: false
294294
});

0 commit comments

Comments
 (0)