From 6adeae686c60bbc22e678d9276471d5f8216a2c2 Mon Sep 17 00:00:00 2001 From: Alex Aubuchon Date: Wed, 29 May 2019 11:56:48 -0700 Subject: [PATCH] test: remove pass-* certs PR-URL: https://github.com/nodejs/node/pull/27962 Reviewed-By: Sam Roberts Reviewed-By: Ujjwal Sharma Reviewed-By: Rich Trott --- test/fixtures/pass-cert.pem | 12 ------------ test/fixtures/pass-csr.pem | 10 ---------- test/fixtures/pass-key.pem | 17 ----------------- test/fixtures/raw-key.pem | 15 --------------- test/parallel/test-tls-passphrase.js | 26 +++++++++++++------------- 5 files changed, 13 insertions(+), 67 deletions(-) delete mode 100644 test/fixtures/pass-cert.pem delete mode 100644 test/fixtures/pass-csr.pem delete mode 100644 test/fixtures/pass-key.pem delete mode 100644 test/fixtures/raw-key.pem diff --git a/test/fixtures/pass-cert.pem b/test/fixtures/pass-cert.pem deleted file mode 100644 index 1b355a8ced4c38..00000000000000 --- a/test/fixtures/pass-cert.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB2TCCAUICCQDQv9q5AAtoEzANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJK -UDEOMAwGA1UECBMFVG9reW8xEjAQBgNVBAoUCW5vZGVqc19qcDAeFw0xMTExMjYx -NzA0MDhaFw0yMTExMjMxNzA0MDhaMDExCzAJBgNVBAYTAkpQMQ4wDAYDVQQIEwVU -b2t5bzESMBAGA1UEChQJbm9kZWpzX2pwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB -iQKBgQChmQeFwsaomtQbw9Nm55Dn6KSR9bkY8PDroQUeTNa90BlIbhGsKYm4l7bE -RaasFgOrkcQpk45fdDVYPjKxraZiGXXKjSIDYeDAIC/+CkwQKrejgCPmJs4gV4g+ -npvwi1gVr2NAg7fkJOyEW2TDp4dsAD8qtG8Aml0C1hJXwFYmBwIDAQABMA0GCSqG -SIb3DQEBBQUAA4GBAGJYkr3VgHUZSyGrdUWeGKiKS4EY3D4ki8Luv9Jf/IpxJLbZ -NGaKUbXSVYSW3US0yR1+lsNvWchmc0wLsbNEHbIiS4BQPkqX7F8FCthM1gwRLQPa -Sofz3dRNFKDmivG9mdbQDPD/duft7Kn6E3JS5myYUJ0dRKeYfOXLXCY2pZpG ------END CERTIFICATE----- diff --git a/test/fixtures/pass-csr.pem b/test/fixtures/pass-csr.pem deleted file mode 100644 index 8436f510549832..00000000000000 --- a/test/fixtures/pass-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBcDCB2gIBADAxMQswCQYDVQQGEwJKUDEOMAwGA1UECBMFVG9reW8xEjAQBgNV -BAoUCW5vZGVqc19qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAoZkHhcLG -qJrUG8PTZueQ5+ikkfW5GPDw66EFHkzWvdAZSG4RrCmJuJe2xEWmrBYDq5HEKZOO -X3Q1WD4ysa2mYhl1yo0iA2HgwCAv/gpMECq3o4Aj5ibOIFeIPp6b8ItYFa9jQIO3 -5CTshFtkw6eHbAA/KrRvAJpdAtYSV8BWJgcCAwEAAaAAMA0GCSqGSIb3DQEBBQUA -A4GBAC9g7s3rG6G7JSTUOizY1u9Ij6QM9Y6PqQthr4OJHa+Hln5FJQahpgJmA4kC -WYoWvBMBgFPFBCYAj0yMPohrlAwlbd9MADe4gg3lxuO9UxXDzp/lOVRBAEa4n5i+ -Lw7VEiJtPha4NXgeNzxi5OyBJwxAOPFwsyCdR0SynlifTFHI ------END CERTIFICATE REQUEST----- diff --git a/test/fixtures/pass-key.pem b/test/fixtures/pass-key.pem deleted file mode 100644 index 968d5175d31593..00000000000000 --- a/test/fixtures/pass-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICojAcBgoqhkiG9w0BDAEDMA4ECMeM7uTE/aoCAgIIAASCAoDIIO3VAz+gb7td -FSOwV/zshzjr7n54r6Jg6fFyeIRrE3tgobr0loPfZUadtd1uxGMFlf4WKqXdk9u/ -Le2BCw34rTVCIlwritFHmcQ56xDKB5WTx+yuzxr97tmnFq00kTeHUcsPOb+eYU5B -2M0xWpYeEUP4iwQafUz6A6EOjSADYYpdgHHAzIY9VwECPkCqOJJti644OMNPUw8q -nvoESqwjAO1t2lymNUFk6zHg6FewiyCfjY6ucUCadbN74vUqKAJI45u7HQL8rxSf -95ncmjpHc+t7GUrQyzD68JaIGFN1Q8d09/ve3EOfoUoDGW+rE3hJ7oISeJfY3k7I -bBw6i0MO/ZfMs9wbmbMNDKzXQMolXfenK+KdD5Scp6eCeE14KqbQXuDoy+yA9CcZ -F87v4AyiY2o+A+cS56oY2R9Gc7uX51N8ZQGCuE/IEXeZbemV81br/EytJiZsXbPj -Kks1QkcsWnfsCUEeyF6IvIRXB70A4fuJ3+V9YoPoIawY18OoRPbMBBWkfMwEJIdB -2bW3joco0unImwRT6aXFghCnHOdXyQOMNtf1aCSDd/7o+Vac50Lwtuwpp7NsnUID -V9reIaEugHuM3PHbv3ygm8o3wb2VVRHgWV/wOReEtqLPhERyM1xfVs0y6xCGiE84 -N4uEzAwSGDFgEYACoj7LrqrVVEeVbrD0Gul2/fq9HnKOk6E/tygrwusasyL5vtSX -ZH/DeKK2XKq70bSu+1eGA/A+SqySckBe4QgEO7Qyb9xWqZhbqDyLg/xCUfDscMyP -WWW6nN56LcWI7UOEfWJVLTFCBil5T4e2qA4BiJTNc8zwwOM0BIyqvnhlENGbwQBI -KuSCzKIh ------END ENCRYPTED PRIVATE KEY----- diff --git a/test/fixtures/raw-key.pem b/test/fixtures/raw-key.pem deleted file mode 100644 index 3e27f9f8870ad0..00000000000000 --- a/test/fixtures/raw-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQChmQeFwsaomtQbw9Nm55Dn6KSR9bkY8PDroQUeTNa90BlIbhGs -KYm4l7bERaasFgOrkcQpk45fdDVYPjKxraZiGXXKjSIDYeDAIC/+CkwQKrejgCPm -Js4gV4g+npvwi1gVr2NAg7fkJOyEW2TDp4dsAD8qtG8Aml0C1hJXwFYmBwIDAQAB -AoGAVgZpAsQVjVwe3kj5GSbc9Rfbw/fTeXuKRWWKm/67soA9dVli/wt9zU62dPW/ -LIzrl0IZ8ygh+p6aZ0d1JTEUCPx7e0KocCmNg77i5AG0eK5i/KKjTWB4UGRDylfD -dnBXQc814bK+VB0mrcp46U/7tLGYkV2Kz/LiNpmxKwITS4ECQQDPoA6WIU87Eulq -OuVmJnFIQ2IR3SycVisO7TUq2MItq2U4BwsA3aQ4ehpP/uJdAfJEfwi2omRV5pGb -806pWkfPAkEAxz+igHS8tR11aLck71dD4BRBY7XZCUg6G4zmYYWsqj0yvM6c4Yn0 -HRcrZqFvV/xuMFphWEmMBhrqLvgy66yUSQJBALkei4LeRid0sDswMhMHGaAFvG4T -FtB5n8CaTPpb854GoKP42521ANP+QnGq36dvsdPStDEqz20rvA4hPLSQs08CQCV8 -eWxFikNg+XfsDQzilCiSZwMFcYHnjtckGSv75FJbFTKkhKuCMuVOOKIkeThKi8iZ -GHttyuRTKAASPjJM09ECQBrhlKJwYKuUDMp3qkLBgrXYqbFxZtkS2GeFMUfLcRlx -oMrTFEczz9lZ0huTuQYPeAAOY0Gd84mL0kQqTRTzNLs= ------END RSA PRIVATE KEY----- diff --git a/test/parallel/test-tls-passphrase.js b/test/parallel/test-tls-passphrase.js index 6ed19c74d22f73..e6b57b243f684b 100644 --- a/test/parallel/test-tls-passphrase.js +++ b/test/parallel/test-tls-passphrase.js @@ -28,9 +28,9 @@ const assert = require('assert'); const tls = require('tls'); const fixtures = require('../common/fixtures'); -const passKey = fixtures.readSync('pass-key.pem'); -const rawKey = fixtures.readSync('raw-key.pem'); -const cert = fixtures.readSync('pass-cert.pem'); +const passKey = fixtures.readKey('rsa_private_encrypted.pem'); +const rawKey = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readKey('rsa_cert.crt'); assert(Buffer.isBuffer(passKey)); assert(Buffer.isBuffer(cert)); @@ -39,7 +39,7 @@ assert.strictEqual(typeof cert.toString(), 'string'); const server = tls.Server({ key: passKey, - passphrase: 'passphrase', + passphrase: 'password', cert: cert, ca: [cert], requestCert: true, @@ -53,7 +53,7 @@ server.listen(0, common.mustCall(function() { tls.connect({ port: this.address().port, key: passKey, - passphrase: 'passphrase', + passphrase: 'password', cert: cert, rejectUnauthorized: false }, common.mustCall()); @@ -77,7 +77,7 @@ server.listen(0, common.mustCall(function() { tls.connect({ port: this.address().port, key: [passKey], - passphrase: 'passphrase', + passphrase: 'password', cert: [cert], rejectUnauthorized: false }, common.mustCall()); @@ -101,7 +101,7 @@ server.listen(0, common.mustCall(function() { tls.connect({ port: this.address().port, key: passKey.toString(), - passphrase: 'passphrase', + passphrase: 'password', cert: cert.toString(), rejectUnauthorized: false }, common.mustCall()); @@ -125,7 +125,7 @@ server.listen(0, common.mustCall(function() { tls.connect({ port: this.address().port, key: [passKey.toString()], - passphrase: 'passphrase', + passphrase: 'password', cert: [cert.toString()], rejectUnauthorized: false }, common.mustCall()); @@ -148,14 +148,14 @@ server.listen(0, common.mustCall(function() { // Object[] tls.connect({ port: this.address().port, - key: [{ pem: passKey, passphrase: 'passphrase' }], + key: [{ pem: passKey, passphrase: 'password' }], cert: cert, rejectUnauthorized: false }, common.mustCall()); tls.connect({ port: this.address().port, - key: [{ pem: passKey, passphrase: 'passphrase' }], + key: [{ pem: passKey, passphrase: 'password' }], passphrase: 'ignored', cert: cert, rejectUnauthorized: false @@ -164,14 +164,14 @@ server.listen(0, common.mustCall(function() { tls.connect({ port: this.address().port, key: [{ pem: passKey }], - passphrase: 'passphrase', + passphrase: 'password', cert: cert, rejectUnauthorized: false }, common.mustCall()); tls.connect({ port: this.address().port, - key: [{ pem: passKey.toString(), passphrase: 'passphrase' }], + key: [{ pem: passKey.toString(), passphrase: 'password' }], cert: cert, rejectUnauthorized: false }, common.mustCall()); @@ -288,7 +288,7 @@ assert.throws(function() { tls.connect({ port: server.address().port, key: [{ pem: passKey, passphrase: 'invalid' }], - passphrase: 'passphrase', // Valid but unused + passphrase: 'password', // Valid but unused cert: cert, rejectUnauthorized: false });