From 62de36e8d3ce5bfb2bb2d5b8110dbb976bfde006 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 5 Jun 2019 18:19:24 -0400 Subject: [PATCH] Revert "test: move all test keys/certs under `test/fixtures/keys/`" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28083 Reviewed-By: Anna Henningsen Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Trivikram Kamat Reviewed-By: Refael Ackermann (רפאל פלחי) --- benchmark/tls/secure-pair.js | 10 +- benchmark/tls/throughput.js | 10 +- benchmark/tls/tls-connect.js | 10 +- test/async-hooks/test-graph.tls-write.js | 4 +- test/async-hooks/test-tlswrap.js | 4 +- test/fixtures/agent.crt | 21 +++ test/fixtures/agent.key | 27 ++++ test/fixtures/alice.crt | 24 ++++ test/fixtures/cert.pem | 35 +++++ test/fixtures/{keys => }/dherror.pem | 3 +- test/fixtures/foafssl.crt | 25 ++++ test/fixtures/foafssl.key | 32 +++++ test/fixtures/keys/.gitattributes | 4 - ...56_signature_signedby_rsa_private_b.sha256 | Bin 256 -> 0 bytes test/fixtures/keys/Makefile | 135 ------------------ test/fixtures/keys/dsa_params.pem | 14 -- test/fixtures/keys/dsa_private.pem | 20 --- test/fixtures/keys/dsa_private_encrypted.pem | 23 --- test/fixtures/keys/dsa_private_pkcs8.pem | 15 -- test/fixtures/keys/dsa_public.pem | 20 --- test/fixtures/keys/ed25519_private.pem | 3 - test/fixtures/keys/ed25519_public.pem | 3 - test/fixtures/keys/ed448_private.pem | 4 - test/fixtures/keys/ed448_public.pem | 4 - test/fixtures/keys/rsa_ca.crt | 24 ---- test/fixtures/keys/rsa_cert.cnf | 23 --- test/fixtures/keys/rsa_cert.crt | 24 ---- test/fixtures/keys/rsa_cert.pfx | Bin 2629 -> 0 bytes test/fixtures/keys/rsa_cert_foafssl_b.cnf | 28 ---- test/fixtures/keys/rsa_cert_foafssl_b.crt | 24 ---- .../fixtures/keys/rsa_cert_foafssl_b.exponent | 1 - test/fixtures/keys/rsa_cert_foafssl_b.modulus | 1 - test/fixtures/keys/rsa_private.pem | 27 ---- test/fixtures/keys/rsa_private_b.pem | 27 ---- test/fixtures/keys/rsa_private_encrypted.pem | 30 ---- test/fixtures/keys/rsa_private_pkcs8.pem | 28 ---- test/fixtures/keys/rsa_private_pkcs8_bad.pem | 28 ---- test/fixtures/keys/rsa_public.pem | 9 -- test/fixtures/keys/rsa_public_b.pem | 9 -- ...c_sha1_signature_signedby_rsa_private.sha1 | 2 - ..._signature_signedby_rsa_private_pkcs8.sha1 | 2 - test/fixtures/keys/rsa_spkac.spkac | 1 - test/fixtures/keys/rsa_spkac_invalid.spkac | 1 - test/fixtures/keys/x25519_private.pem | 3 - test/fixtures/keys/x25519_public.pem | 3 - test/fixtures/keys/x448_private.pem | 4 - test/fixtures/keys/x448_public.pem | 4 - test/fixtures/msca.pem | 15 ++ test/fixtures/multi-alice.crt | 22 +++ 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/fixtures/spkac.fail | 1 + test/fixtures/spkac.pem | 6 + test/fixtures/spkac.valid | 1 + test/fixtures/test_bad_rsa_privkey.pem | 10 ++ test/fixtures/test_ca.pem | 20 +++ test/fixtures/test_cert.pem | 20 +++ test/fixtures/test_cert.pfx | Bin 0 -> 1885 bytes test/fixtures/test_dsa_params.pem | 14 ++ test/fixtures/test_dsa_pkcs8_privkey.pem | 15 ++ test/fixtures/test_dsa_privkey.pem | 20 +++ test/fixtures/test_dsa_privkey_encrypted.pem | 16 +++ test/fixtures/test_dsa_pubkey.pem | 20 +++ test/fixtures/test_ed25519_privkey.pem | 3 + test/fixtures/test_ed25519_pubkey.pem | 3 + test/fixtures/test_ed448_privkey.pem | 4 + test/fixtures/test_ed448_pubkey.pem | 4 + test/fixtures/test_key.pem | 15 ++ test/fixtures/test_rsa_pkcs8_privkey.pem | 16 +++ test/fixtures/test_rsa_privkey.pem | 15 ++ test/fixtures/test_rsa_privkey_2.pem | 15 ++ test/fixtures/test_rsa_privkey_encrypted.pem | 17 +++ test/fixtures/test_rsa_pubkey.pem | 6 + test/fixtures/test_rsa_pubkey_2.pem | 5 + test/fixtures/test_x25519_privkey.pem | 3 + test/fixtures/test_x25519_pubkey.pem | 3 + test/fixtures/test_x448_privkey.pem | 4 + test/fixtures/test_x448_pubkey.pem | 4 + test/parallel/test-crypto-binary-default.js | 39 ++--- test/parallel/test-crypto-certificate.js | 11 +- test/parallel/test-crypto-key-objects.js | 22 +-- test/parallel/test-crypto-rsa-dsa.js | 57 ++++---- test/parallel/test-crypto-sign-verify.js | 16 +-- test/parallel/test-crypto-verify-failure.js | 2 +- test/parallel/test-crypto.js | 13 +- test/parallel/test-https-client-reject.js | 6 +- .../test-https-client-renegotiation-limit.js | 4 +- test/parallel/test-https-drain.js | 4 +- test/parallel/test-https-foafssl.js | 24 ++-- test/parallel/test-https-pfx.js | 2 +- .../test-https-unix-socket-self-signed.js | 4 +- .../test-tls-async-cb-after-socket-end.js | 4 +- test/parallel/test-tls-client-abort.js | 4 +- test/parallel/test-tls-client-reject.js | 6 +- .../test-tls-client-renegotiation-limit.js | 4 +- .../parallel/test-tls-connect-given-socket.js | 4 +- test/parallel/test-tls-connect-memleak.js | 4 +- test/parallel/test-tls-connect-no-host.js | 4 +- .../test-tls-connect-stream-writes.js | 6 +- test/parallel/test-tls-destroy-stream.js | 6 +- test/parallel/test-tls-dhe.js | 6 +- test/parallel/test-tls-fast-writing.js | 6 +- test/parallel/test-tls-getprotocol.js | 4 +- test/parallel/test-tls-handshake-exception.js | 4 +- .../parallel/test-tls-hello-parser-failure.js | 4 +- test/parallel/test-tls-inception.js | 4 +- test/parallel/test-tls-interleave.js | 6 +- test/parallel/test-tls-keylog-tlsv13.js | 4 +- .../test-tls-net-connect-prefer-path.js | 4 +- test/parallel/test-tls-no-sslv3.js | 4 +- test/parallel/test-tls-passphrase.js | 26 ++-- test/parallel/test-tls-pause.js | 4 +- .../test-tls-peer-certificate-multi-keys.js | 8 +- test/parallel/test-tls-securepair-fiftharg.js | 4 +- test/parallel/test-tls-securepair-server.js | 4 +- test/parallel/test-tls-session-cache.js | 8 +- test/parallel/test-tls-ticket-cluster.js | 4 +- test/parallel/test-tls-zero-clear-in.js | 4 +- test/parallel/test-vm-syntax-error-stderr.js | 2 +- test/pummel/test-https-no-reader.js | 4 +- test/sequential/test-async-wrap-getasyncid.js | 6 +- test/sequential/test-tls-connect.js | 8 +- test/sequential/test-tls-securepair-client.js | 2 +- test/sequential/test-tls-session-timeout.js | 4 +- 126 files changed, 738 insertions(+), 746 deletions(-) create mode 100644 test/fixtures/agent.crt create mode 100644 test/fixtures/agent.key create mode 100644 test/fixtures/alice.crt create mode 100644 test/fixtures/cert.pem rename test/fixtures/{keys => }/dherror.pem (51%) create mode 100644 test/fixtures/foafssl.crt create mode 100644 test/fixtures/foafssl.key delete mode 100644 test/fixtures/keys/.gitattributes delete mode 100644 test/fixtures/keys/I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 delete mode 100644 test/fixtures/keys/dsa_params.pem delete mode 100644 test/fixtures/keys/dsa_private.pem delete mode 100644 test/fixtures/keys/dsa_private_encrypted.pem delete mode 100644 test/fixtures/keys/dsa_private_pkcs8.pem delete mode 100644 test/fixtures/keys/dsa_public.pem delete mode 100644 test/fixtures/keys/ed25519_private.pem delete mode 100644 test/fixtures/keys/ed25519_public.pem delete mode 100644 test/fixtures/keys/ed448_private.pem delete mode 100644 test/fixtures/keys/ed448_public.pem delete mode 100644 test/fixtures/keys/rsa_ca.crt delete mode 100644 test/fixtures/keys/rsa_cert.cnf delete mode 100644 test/fixtures/keys/rsa_cert.crt delete mode 100644 test/fixtures/keys/rsa_cert.pfx delete mode 100644 test/fixtures/keys/rsa_cert_foafssl_b.cnf delete mode 100644 test/fixtures/keys/rsa_cert_foafssl_b.crt delete mode 100644 test/fixtures/keys/rsa_cert_foafssl_b.exponent delete mode 100644 test/fixtures/keys/rsa_cert_foafssl_b.modulus delete mode 100644 test/fixtures/keys/rsa_private.pem delete mode 100644 test/fixtures/keys/rsa_private_b.pem delete mode 100644 test/fixtures/keys/rsa_private_encrypted.pem delete mode 100644 test/fixtures/keys/rsa_private_pkcs8.pem delete mode 100644 test/fixtures/keys/rsa_private_pkcs8_bad.pem delete mode 100644 test/fixtures/keys/rsa_public.pem delete mode 100644 test/fixtures/keys/rsa_public_b.pem delete mode 100644 test/fixtures/keys/rsa_public_sha1_signature_signedby_rsa_private.sha1 delete mode 100644 test/fixtures/keys/rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1 delete mode 100644 test/fixtures/keys/rsa_spkac.spkac delete mode 100644 test/fixtures/keys/rsa_spkac_invalid.spkac delete mode 100644 test/fixtures/keys/x25519_private.pem delete mode 100644 test/fixtures/keys/x25519_public.pem delete mode 100644 test/fixtures/keys/x448_private.pem delete mode 100644 test/fixtures/keys/x448_public.pem create mode 100644 test/fixtures/msca.pem create mode 100644 test/fixtures/multi-alice.crt create mode 100644 test/fixtures/pass-cert.pem create mode 100644 test/fixtures/pass-csr.pem create mode 100644 test/fixtures/pass-key.pem create mode 100644 test/fixtures/raw-key.pem create mode 100644 test/fixtures/spkac.fail create mode 100644 test/fixtures/spkac.pem create mode 100644 test/fixtures/spkac.valid create mode 100644 test/fixtures/test_bad_rsa_privkey.pem create mode 100644 test/fixtures/test_ca.pem create mode 100644 test/fixtures/test_cert.pem create mode 100644 test/fixtures/test_cert.pfx create mode 100644 test/fixtures/test_dsa_params.pem create mode 100644 test/fixtures/test_dsa_pkcs8_privkey.pem create mode 100644 test/fixtures/test_dsa_privkey.pem create mode 100644 test/fixtures/test_dsa_privkey_encrypted.pem create mode 100644 test/fixtures/test_dsa_pubkey.pem create mode 100644 test/fixtures/test_ed25519_privkey.pem create mode 100644 test/fixtures/test_ed25519_pubkey.pem create mode 100644 test/fixtures/test_ed448_privkey.pem create mode 100644 test/fixtures/test_ed448_pubkey.pem create mode 100644 test/fixtures/test_key.pem create mode 100644 test/fixtures/test_rsa_pkcs8_privkey.pem create mode 100644 test/fixtures/test_rsa_privkey.pem create mode 100644 test/fixtures/test_rsa_privkey_2.pem create mode 100644 test/fixtures/test_rsa_privkey_encrypted.pem create mode 100644 test/fixtures/test_rsa_pubkey.pem create mode 100644 test/fixtures/test_rsa_pubkey_2.pem create mode 100644 test/fixtures/test_x25519_privkey.pem create mode 100644 test/fixtures/test_x25519_pubkey.pem create mode 100644 test/fixtures/test_x448_privkey.pem create mode 100644 test/fixtures/test_x448_pubkey.pem diff --git a/benchmark/tls/secure-pair.js b/benchmark/tls/secure-pair.js index c0409febacda00..ed678b9060983e 100644 --- a/benchmark/tls/secure-pair.js +++ b/benchmark/tls/secure-pair.js @@ -6,19 +6,21 @@ const bench = common.createBenchmark(main, { size: [2, 1024, 1024 * 1024] }); -const fixtures = require('../../test/common/fixtures'); +const fs = require('fs'); 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: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: fixtures.readKey('rsa_ca.crt'), + key: fs.readFileSync(`${cert_dir}/test_key.pem`), + cert: fs.readFileSync(`${cert_dir}/test_cert.pem`), + ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ], ciphers: 'AES256-GCM-SHA384', isServer: true, requestCert: true, diff --git a/benchmark/tls/throughput.js b/benchmark/tls/throughput.js index a8f2d19649d04a..cd957ff1edf495 100644 --- a/benchmark/tls/throughput.js +++ b/benchmark/tls/throughput.js @@ -6,7 +6,9 @@ const bench = common.createBenchmark(main, { size: [2, 1024, 1024 * 1024] }); -const fixtures = require('../../test/common/fixtures'); +const path = require('path'); +const fs = require('fs'); +const cert_dir = path.resolve(__dirname, '../../test/fixtures'); var options; const tls = require('tls'); @@ -30,9 +32,9 @@ function main({ dur, type, size }) { } options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: fixtures.readKey('rsa_ca.crt'), + key: fs.readFileSync(`${cert_dir}/test_key.pem`), + cert: fs.readFileSync(`${cert_dir}/test_cert.pem`), + ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ], ciphers: 'AES256-GCM-SHA384' }; diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js index 4300f6841f0cd6..fa6e2cb80abf06 100644 --- a/benchmark/tls/tls-connect.js +++ b/benchmark/tls/tls-connect.js @@ -1,5 +1,6 @@ 'use strict'; -const fixtures = require('../../test/common/fixtures'); +const fs = require('fs'); +const path = require('path'); const tls = require('tls'); const common = require('../common.js'); @@ -17,10 +18,11 @@ var running = true; function main(conf) { dur = conf.dur; concurrency = conf.concurrency; + const cert_dir = path.resolve(__dirname, '../../test/fixtures'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: fixtures.readKey('rsa_ca.crt'), + key: fs.readFileSync(`${cert_dir}/test_key.pem`), + cert: fs.readFileSync(`${cert_dir}/test_cert.pem`), + ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ], ciphers: 'AES256-GCM-SHA384' }; diff --git a/test/async-hooks/test-graph.tls-write.js b/test/async-hooks/test-graph.tls-write.js index f8bee6a879d0b4..5aee38e6b6841a 100644 --- a/test/async-hooks/test-graph.tls-write.js +++ b/test/async-hooks/test-graph.tls-write.js @@ -20,8 +20,8 @@ hooks.enable(); // const server = tls .createServer({ - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }) .on('listening', common.mustCall(onlistening)) .on('secureConnection', common.mustCall(onsecureConnection)) diff --git a/test/async-hooks/test-tlswrap.js b/test/async-hooks/test-tlswrap.js index 65a4087d1659c6..d6dcd204703d9d 100644 --- a/test/async-hooks/test-tlswrap.js +++ b/test/async-hooks/test-tlswrap.js @@ -24,8 +24,8 @@ tls.DEFAULT_MAX_VERSION = 'TLSv1.2'; // const server = tls .createServer({ - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }) .on('listening', common.mustCall(onlistening)) .on('secureConnection', common.mustCall(onsecureConnection)) diff --git a/test/fixtures/agent.crt b/test/fixtures/agent.crt new file mode 100644 index 00000000000000..5883cd44961e67 --- /dev/null +++ b/test/fixtures/agent.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDXTCCAkWgAwIBAgIJAMUSOvlaeyQHMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQwHhcNMTAxMTE2MDkzMjQ5WhcNMTMxMTE1MDkzMjQ5WjBF +MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 +ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEVwfPQQp4X +wtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+1FAE0c5o +exPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404WthquTqg +S7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy25IyBK3QJ +c+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWAQsqW+COL +0Sa5BuMFrFIpjPrEe0ih7vRRbdmXRwIDAQABo1AwTjAdBgNVHQ4EFgQUDnV4d6mD +tOnluLoCjkUHTX/n4agwHwYDVR0jBBgwFoAUDnV4d6mDtOnluLoCjkUHTX/n4agw +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAFwV4MQfTo+qMv9JMiyno +IEiqfOz4RgtmBqRnXUffcjS2dhc7/z+FPZnM79Kej8eLHoVfxCyWRHFlzm93vEdv +wxOCrD13EDOi08OOZfxWyIlCa6Bg8cMAKqQzd2OvQOWqlRWBTThBJIhWflU33izX +Qn5GdmYqhfpc+9ZHHGhvXNydtRQkdxVK2dZNzLBvBlLlRmtoClU7xm3A+/5dddeP +AQHEPtyFlUw49VYtZ3ru6KqPms7MKvcRhYLsy9rwSfuuniMlx4d0bDR7TOkw0QQS +A0N8MGQRQpzl4mw4jLzyM5d5QtuGBh2P6hPGa0YQxtI3RPT/p6ENzzBiAKXiSfzo +xw== +-----END CERTIFICATE----- diff --git a/test/fixtures/agent.key b/test/fixtures/agent.key new file mode 100644 index 00000000000000..f31ff3d9441075 --- /dev/null +++ b/test/fixtures/agent.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEV +wfPQQp4XwtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+ +1FAE0c5oexPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404 +WthquTqgS7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy2 +5IyBK3QJc+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWA +QsqW+COL0Sa5BuMFrFIpjPrEe0ih7vRRbdmXRwIDAQABAoIBAGe4+9VqZfJN+dsq +8Osyuz01uQ8OmC0sAWTIqUlQgENIyf9rCJsUBlYmwR5BT6Z69XP6QhHdpSK+TiAR +XUz0EqG9HYzcxHIBaACP7j6iRoQ8R4kbbiWKo0z3WqQGIOqFjvD/mKEuQdE5mEYw +eOUCG6BnX1WY2Yr8WKd2AA/tp0/Y4d8z04u9eodMpSTbHTzYMJb5SbBN1vo6FY7q +8zSuO0BMzXlAxUsCwHsk1GQHFr8Oh3zIR7bQGtMBouI+6Lhh7sjFYsfxJboqMTBV +IKaA216M6ggHG7MU1/jeKcMGDmEfqQLQoyWp29rMK6TklUgipME2L3UD7vTyAVzz +xbVOpZkCgYEA8CXW4sZBBrSSrLR5SB+Ubu9qNTggLowOsC/kVKB2WJ4+xooc5HQo +mFhq1v/WxPQoWIxdYsfg2odlL+JclK5Qcy6vXmRSdAQ5lK9gBDKxZSYc3NwAw2HA +zyHCTK+I0n8PBYQ+yGcrxu0WqTGnlLW+Otk4CejO34WlgHwbH9bbY5UCgYEA3ZvT +C4+OoMHXlmICSt29zUrYiL33IWsR3/MaONxTEDuvgkOSXXQOl/8Ebd6Nu+3WbsSN +bjiPC/JyL1YCVmijdvFpl4gjtgvfJifs4G+QHvO6YfsYoVANk4u6g6rUuBIOwNK4 +RwYxwDc0oysp+g7tPxoSgDHReEVKJNzGBe9NGGsCgYEA4O4QP4gCEA3B9BF2J5+s +n9uPVxmiyvZUK6Iv8zP4pThTBBMIzNIf09G9AHPQ7djikU2nioY8jXKTzC3xGTHM +GJZ5m6fLsu7iH+nDvSreDSeNkTBfZqGAvoGYQ8uGE+L+ZuRfCcXYsxIOT5s6o4c3 +Dle2rVFpsuKzCY00urW796ECgYBn3go75+xEwrYGQSer6WR1nTgCV29GVYXKPooy +zmmMOT1Yw80NSkEw0pFD4cTyqVYREsTrPU0mn1sPfrOXxnGfZSVFpcR/Je9QVfQ7 +eW7GYxwfom335aqHVj10SxRqteP+UoWWnHujCPz94VRKZMakBddYCIGSan+G6YdS +7sdmwwKBgBc2qj0wvGXDF2kCLwSGfWoMf8CS1+5fIiUIdT1e/+7MfDdbmLMIFVjF +QKS3zVViXCbrG5SY6wS9hxoc57f6E2A8vcaX6zy2xkZlGHQCpWRtEM5R01OWJQaH +HsHMmQZGUQVoDm1oRkDhrTFK4K3ukc3rAxzeTZ96utOQN8/KJsTv +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/alice.crt b/test/fixtures/alice.crt new file mode 100644 index 00000000000000..b4e986bc7bf2b1 --- /dev/null +++ b/test/fixtures/alice.crt @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID8DCCAtigAwIBAgIJALmw0zKhqlY1MA0GCSqGSIb3DQEBBQUAMFgxDjAMBgNV +BAMTBWFsaWNlMUYwRAYDVR0RFD11bmlmb3JtUmVzb3VyY2VJZGVudGlmaWVyOmh0 +dHA6Ly9sb2NhbGhvc3Q6ODAwMC9hbGljZS5mb2FmI21lMB4XDTExMDgyNDA1NTUx +NFoXDTExMDkyMzA1NTUxNFowWDEOMAwGA1UEAxMFYWxpY2UxRjBEBgNVHREUPXVu +aWZvcm1SZXNvdXJjZUlkZW50aWZpZXI6aHR0cDovL2xvY2FsaG9zdDo4MDAwL2Fs +aWNlLmZvYWYjbWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDP4tdk +6NxAImrf5kpQVpuPvWij97H9ewFwWq0FOGONPD0JURXB89BCnhfC0+IHbTi+dhfB +DX9HY11NCoJm7juXv0uywv+7Zrlj37Q0RTedADmp237UUATRzmh7E+KZc6tHcZZ8 +rPs+ZnY7TXXsh4JRRc8blTy6aEN7/iYMXhk0mIpzjTha2Gq5OqBLustBkeFnoPQS +cac6TOWbEkxg80dI5jX/qK901RRwLztrA0QDeWB+HLbkjIErdAlz5pgo1Nu3vQt6 +vLdu7bBYsUa2Y2IaVBNLgmzEiZGwQJMjvbs5tLv8VYBCypb4I4vRJrkG4wWsUimM ++sR7SKHu9FFt2ZdHAgMBAAGjgbwwgbkwHQYDVR0OBBYEFA51eHepg7Tp5bi6Ao5F +B01/5+GoMIGJBgNVHSMEgYEwf4AUDnV4d6mDtOnluLoCjkUHTX/n4aihXKRaMFgx +DjAMBgNVBAMTBWFsaWNlMUYwRAYDVR0RFD11bmlmb3JtUmVzb3VyY2VJZGVudGlm +aWVyOmh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9hbGljZS5mb2FmI21lggkAubDTMqGq +VjUwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAreudH4Y7R9Vl2GJo +2xRUEwZiMj/ogomZ7B+IZtcuMIR8X2mzQ30xmPKaCy/fjbueqBroIDdxFeQ4eWZf +MD3AK/q5lJXwSInDjnn7jE9gNgLdQeCnajV0/QH+eDxIe/Alvx+RuvrDiNOudEs4 +vhqv5zEaL6VEXoWVb4/cghDbynQucSpyOMmGGPYYw2zmg0nNXdQauYWDUZIaDwQ6 +tM/pi2ewYubHPZdwJv5jvxTN3Z7RuuGHM+aLAZSAqSgAi0ml8PYYd2eRzXMaEI0c +eajcEvVa405aYT6dxuF1qqRDYx14As/R7O5RKCpz7wsxD6ICD/Ynv3GCUGxANQim +bcCjpg== +-----END CERTIFICATE----- diff --git a/test/fixtures/cert.pem b/test/fixtures/cert.pem new file mode 100644 index 00000000000000..33854c2046b232 --- /dev/null +++ b/test/fixtures/cert.pem @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIDNDCCAp2gAwIBAgIJAJvXLQpGPpm7MA0GCSqGSIb3DQEBBQUAMHAxCzAJBgNV +BAYTAkdCMRAwDgYDVQQIEwdHd3luZWRkMREwDwYDVQQHEwhXYXVuZmF3cjEUMBIG +A1UEChMLQWNrbmFjayBMdGQxEjAQBgNVBAsTCVRlc3QgQ2VydDESMBAGA1UEAxMJ +bG9jYWxob3N0MB4XDTA5MTEwMjE5MzMwNVoXDTEwMTEwMjE5MzMwNVowcDELMAkG +A1UEBhMCR0IxEDAOBgNVBAgTB0d3eW5lZGQxETAPBgNVBAcTCFdhdW5mYXdyMRQw +EgYDVQQKEwtBY2tuYWNrIEx0ZDESMBAGA1UECxMJVGVzdCBDZXJ0MRIwEAYDVQQD +Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANdym7nGe2yw +6LlJfJrQtC5TmKOGrSXiyolYCbGOy4xZI4KD31d3097jhlQFJyF+10gwkE62DuJe +fLvBZDUsvLe1R8bzlVhZnBVn+3QJyUIWQAL+DsRj8P3KoD7k363QN5dIaA1GOAg2 +vZcPy1HCUsvOgvDXGRUCZqNLAyt+h/cpAgMBAAGjgdUwgdIwHQYDVR0OBBYEFK4s +VBV4shKUj3UX/fvSJnFaaPBjMIGiBgNVHSMEgZowgZeAFK4sVBV4shKUj3UX/fvS +JnFaaPBjoXSkcjBwMQswCQYDVQQGEwJHQjEQMA4GA1UECBMHR3d5bmVkZDERMA8G +A1UEBxMIV2F1bmZhd3IxFDASBgNVBAoTC0Fja25hY2sgTHRkMRIwEAYDVQQLEwlU +ZXN0IENlcnQxEjAQBgNVBAMTCWxvY2FsaG9zdIIJAJvXLQpGPpm7MAwGA1UdEwQF +MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAFxR7BA1mUlsYqPiogtxSIfLzHWh+s0bJ +SBuhNrHes4U8QxS8+x/KWjd/81gzsf9J1C2VzTlFaydAgigz3SkQYgs+TMnFkT2o +9jqoJrcdf4WpZ2DQXUALaZgwNzPumMUSx8Ac5gO+BY/RHyP6fCodYvdNwyKslnI3 +US7eCSHZsVo= +-----END CERTIFICATE----- +-----BEGIN RSA PRIVATE KEY----- +MIICXgIBAAKBgQDXcpu5xntssOi5SXya0LQuU5ijhq0l4sqJWAmxjsuMWSOCg99X +d9Pe44ZUBSchftdIMJBOtg7iXny7wWQ1LLy3tUfG85VYWZwVZ/t0CclCFkAC/g7E +Y/D9yqA+5N+t0DeXSGgNRjgINr2XD8tRwlLLzoLw1xkVAmajSwMrfof3KQIDAQAB +AoGBAIBHR/tT93ce2mJAJAXV0AJpWc+7x2pwX2FpXtQujnlxNZhnRlrBCRCD7h4m +t0bVS/86kyGaesBDvAbavfx/N5keYzzmmSp5Ht8IPqKPydGWdigk4x90yWvktai7 +dWuRKF94FXr0GUuBONb/dfHdp4KBtzN7oIF9WydYGGXA9ZmBAkEA8/k01bfwQZIu +AgcdNEM94Zcug1gSspXtUu8exNQX4+PNVbadghZb1+OnUO4d3gvWfqvAnaXD3KV6 +N4OtUhQQ0QJBAOIRbKMfaymQ9yE3CQQxYfKmEhHXWARXVwuYqIFqjmhSjSXx0l/P +7mSHz1I9uDvxkJev8sQgu1TKIyTOdqPH1tkCQQDPa6H1yYoj1Un0Q2Qa2Mg1kTjk +Re6vkjPQ/KcmJEOjZjtekgFbZfLzmwLXFXqjG2FjFFaQMSxR3QYJSJQEYjbhAkEA +sy7OZcjcXnjZeEkv61Pc57/7qIp/6Aj2JGnefZ1gvI1Z9Q5kCa88rA/9Iplq8pA4 +ZBKAoDW1ZbJGAsFmxc/6mQJAdPilhci0qFN86IGmf+ZBnwsDflIwHKDaVofti4wQ +sPWhSOb9VQjMXekI4Y2l8fqAVTS2Fn6+8jkVKxXBywSVCw== +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/keys/dherror.pem b/test/fixtures/dherror.pem similarity index 51% rename from test/fixtures/keys/dherror.pem rename to test/fixtures/dherror.pem index 4f56268d19a23e..455795fc6cffd3 100644 --- a/test/fixtures/keys/dherror.pem +++ b/test/fixtures/dherror.pem @@ -1,4 +1,3 @@ -----BEGIN DH PARAMETERS----- -AAAAAAAAAA -AAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -----END DH PARAMETERS----- diff --git a/test/fixtures/foafssl.crt b/test/fixtures/foafssl.crt new file mode 100644 index 00000000000000..4a95dcd714a8ca --- /dev/null +++ b/test/fixtures/foafssl.crt @@ -0,0 +1,25 @@ +Bag Attributes + friendlyName: Me's Not a Certification Authority ID + localKeyID: 98 CC 02 91 83 8D 14 4A 60 40 B7 11 E8 EF A9 01 4B D7 16 8A +subject=/O=FOAF+SSL/OU=The Community Of Self Signers/UID=http://example.com/#me/CN=Me +issuer=/O=FOAF+SSL/OU=The Community of Self Signers/CN=Not a Certification Authority +-----BEGIN CERTIFICATE----- +MIIDVDCCAr2gAwIBAgIQRLIhwZ2N3ciEdpWb6kPmPzANBgkqhkiG9w0BAQUFADBj +MREwDwYDVQQKDAhGT0FGK1NTTDEmMCQGA1UECwwdVGhlIENvbW11bml0eSBvZiBT +ZWxmIFNpZ25lcnMxJjAkBgNVBAMMHU5vdCBhIENlcnRpZmljYXRpb24gQXV0aG9y +aXR5MB4XDTExMDgzMDE3MzIwNFoXDTEyMDgyMDE5MzIwNFowcDERMA8GA1UECgwI +Rk9BRitTU0wxJjAkBgNVBAsMHVRoZSBDb21tdW5pdHkgT2YgU2VsZiBTaWduZXJz +MSYwJAYKCZImiZPyLGQBAQwWaHR0cDovL2V4YW1wbGUuY29tLyNtZTELMAkGA1UE +AwwCTWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCm9EqcJXkUMSFP +XIevngQBd6i7iayAP34Ju8OlUZ80nNm5xAvkNtCqgjqUFH4myJJIraK+PdTTTowo +lkaUsgR9IXtPEpk3Hqk6g8iauUQHJBMeZfKwFh3pVgzenBNFVVKy9Jzw+wDY13Uy +MkkT9vgP8p0KEx0p2wav+L4ZG3kg3C2uHCbqgqR4R6EDke879qq7PMQP+CEAsDpP +D/GAknjk3f2n3pVO1W3HrZpH7rw313GjZvxgpby3I3O+wYBkmz76DpCScHIQtBuQ +Ayuxi8kfIEbr2vEZH0pOJtcYecTHhnti/NUI6M5m6C0SinHpFYCfz0To3ndAZ/He +XXC5wDaHAgMBAAGjeDB2MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgLsMBEG +CWCGSAGG+EIBAQQEAwIFoDAdBgNVHQ4EFgQU3gJIUFpe8rKklsjEdsxlaT6rZhow +JAYDVR0RAQH/BBowGIYWaHR0cDovL2V4YW1wbGUuY29tLyNtZTANBgkqhkiG9w0B +AQUFAAOBgQBLhwWbYMdeSkVZ4biVUle+XHP4Gv8V9WSfldvgn1PntS1lpVR46Exl +AkLO1SrnN5WHeAjv6VNb3KmTF+QhLt/4a1l9CEEeZSg5ml5aeXE+veobgypDoam+ +NKYAeIW9Wx+HcgBL4leIX3WiCKu/eal+a5ro18LQ8hkZqryHeVESIw== +-----END CERTIFICATE----- diff --git a/test/fixtures/foafssl.key b/test/fixtures/foafssl.key new file mode 100644 index 00000000000000..facbec5541be27 --- /dev/null +++ b/test/fixtures/foafssl.key @@ -0,0 +1,32 @@ +Bag Attributes + friendlyName: Me's Not a Certification Authority ID + localKeyID: 98 CC 02 91 83 8D 14 4A 60 40 B7 11 E8 EF A9 01 4B D7 16 8A +Key Attributes: +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCm9EqcJXkUMSFP +XIevngQBd6i7iayAP34Ju8OlUZ80nNm5xAvkNtCqgjqUFH4myJJIraK+PdTTTowo +lkaUsgR9IXtPEpk3Hqk6g8iauUQHJBMeZfKwFh3pVgzenBNFVVKy9Jzw+wDY13Uy +MkkT9vgP8p0KEx0p2wav+L4ZG3kg3C2uHCbqgqR4R6EDke879qq7PMQP+CEAsDpP +D/GAknjk3f2n3pVO1W3HrZpH7rw313GjZvxgpby3I3O+wYBkmz76DpCScHIQtBuQ +Ayuxi8kfIEbr2vEZH0pOJtcYecTHhnti/NUI6M5m6C0SinHpFYCfz0To3ndAZ/He +XXC5wDaHAgMBAAECggEAEhwrv7Zc5PDTYS1zVnx4iMQ3HGi5uouom1uvxE4PTAC7 +qWf3tkCv798Cha+XY5OcMqALKEHCxU0e7QQoEdchn4UzQAePcSg1STCkYQw5seCa +5lA+vBUaF4aLDNa3TG0N9HWOVKGVnO/6OYC05qKClBBIMqCSKEkm942u6UBOql6q +71Sj1Nd/4eP9AcvgO5cgyUszM2I25LzXIZW7JLgdqXiJRj8CuY3X5FVURvadENgk +ctw5EjdT7LNdc67Ot9Bs6qcVr2ld/U+4ZSC2+cqtPyn7mnA4hrYXlpA1Ilv3oRwZ +aUJfG5HVV4jjNVHxDqddBh3UhOxJYZ1DNEMndTBx8QKBgQDcsrLfkE6utaj8w/of +Hk/aq1JRNLgSvhoP2wVmK7USvYFj7DIvL4CqyghY5TLgNk272v8mT0Q7R6AtsOUk +Gf50uZFAtIoPvTsvBu6cbRsPTeGJ0i1+LLme/AJu3MexXLF6mlzoGmlx8V7CoFqI +9hvqBA5rZ6ecoSjmU2q2xWKXKQKBgQDBqNqicSp2jnHiTXYbG/tsnxhFwALdEjvb +EgZprmoBzo1eQFOY/DNBdDiEZBstu9mJBX3XWTU1F4c6tYRocNCMDwLBZAB6NnVM +JjoddJApa5Qg3uoXmk53saZhcVkOzh+P/Dxg9c9O3q4DDUegnkM95ZSbCPtIBq6K +bPA3OS+GLwKBgQCY0022LjGuHbFlRzg+sDjPzW71OLJ2mBln/VyhwYZj8cJVtUuT +DSvmGHzrQduXE0OE4ENq/dzbx9+NhD9IXo+ruIxy6BHqkDkZeY1l2M+yK1YQn/BM +vR/UjeIJbu0BTpS/t4C6YP+/nUrnLy9CRFpUFHb/vQl+FsNBq2XsJob88QKBgQCD +6B5bbNduf2HEsdxTZMDhYJAo2jtZFxVcBzAFBb7A0k7qNsh6OLY0zBO+4Wy9vujR +8sKfTuz157u9WmwAs27pJ0RKM3I7zCIjJxqIe5/CBruTlCJAx2LRFljsoEb31aAb +88Owi12ULAq8m2wBVCsa2uhYnUqC6cIzGTaZdsMPEwKBgQDJXI+J2d36IWzFrByH +yskssFldbLxm/7EexzAYuoSpHuQIxGJYHTHn6CZhqrX8UbxVnS909ES+17kdLZVP +egvaxn1mtfZInnH64PiQDQrsNnbP4Zg8yvLvIcEVIPqnSQ5QrhdR29tjYuDwUIKM +4BMR2yfkFp6URRX7ZD1UQsduww== +-----END PRIVATE KEY----- diff --git a/test/fixtures/keys/.gitattributes b/test/fixtures/keys/.gitattributes deleted file mode 100644 index 87a4fb14e41aaa..00000000000000 --- a/test/fixtures/keys/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -* -text - -Makefile text -*.cnf text diff --git a/test/fixtures/keys/I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 b/test/fixtures/keys/I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 deleted file mode 100644 index 59eb6c7c8831cc21f840333ef9b1fd375997969e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssCa`<*sOtJZ2_Xso%22DtCR2=2O46@e(%w`g0WQup7IIJApcZ^}TeJ#Wkq zV`aA)8anIRgMvQXTus&?Pku}yJzz4U(i-#tP?~8T>FH!KK*NFD;GH1zfk(ftAO{6W z%J>u4hmn(!5@)Aqyt(dyuVg=+HJ@I6j)2da{z5wKI_T_qi8Ui=mq#ILj*w_vtdv9k zcJ0?Q5I7u7R@C!qbI2e*WnGM@ZEfmL%l^*?HDw*2v41)Oho&$)*G7*F2%F*$iwS;-5}QR8`Y^#%RKg+hC6Rnu7TKAP?aKwGco0 GrD6ik<9l}i diff --git a/test/fixtures/keys/Makefile b/test/fixtures/keys/Makefile index 980fe8cf4cfc17..81fe36a81331eb 100644 --- a/test/fixtures/keys/Makefile +++ b/test/fixtures/keys/Makefile @@ -24,12 +24,6 @@ all: \ dh512.pem \ dh1024.pem \ dh2048.pem \ - dherror.pem \ - dsa_params.pem \ - dsa_private.pem \ - dsa_private_encrypted.pem \ - dsa_private_pkcs8.pem \ - dsa_public.pem \ dsa1025.pem \ dsa_private_1025.pem \ dsa_private_encrypted_1025.pem \ @@ -37,24 +31,6 @@ all: \ ec-cert.pem \ ec.pfx \ fake-cnnic-root-cert.pem \ - rsa_private.pem \ - rsa_private_encrypted.pem \ - rsa_private_pkcs8.pem \ - rsa_private_pkcs8_bad.pem \ - rsa_public.pem \ - rsa_ca.crt \ - rsa_cert.crt \ - rsa_cert.pfx \ - rsa_public_sha1_signature_signedby_rsa_private.sha1 \ - rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1 \ - rsa_private_b.pem \ - I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 \ - rsa_public_b.pem \ - rsa_cert_foafssl_b.crt \ - rsa_cert_foafssl_b.modulus \ - rsa_cert_foafssl_b.exponent \ - rsa_spkac.spkac \ - rsa_spkac_invalid.spkac \ rsa_private_1024.pem \ rsa_private_2048.pem \ rsa_private_4096.pem \ @@ -67,14 +43,6 @@ all: \ rsa_pss_public_2048.pem \ rsa_pss_public_2048_sha256_sha256_16.pem \ rsa_pss_public_2048_sha512_sha256_20.pem \ - ed25519_private.pem \ - ed25519_public.pem \ - x25519_private.pem \ - x25519_public.pem \ - ed448_private.pem \ - ed448_public.pem \ - x448_private.pem \ - x448_public.pem \ # # Create Certificate Authority: ca1 @@ -582,24 +550,6 @@ dh1024.pem: dh2048.pem: openssl dhparam -out dh2048.pem 2048 -dherror.pem: dh512.pem - sed 's/^[^-].*/AAAAAAAAAA/g' dh512.pem > dherror.pem - -dsa_params.pem: - openssl dsaparam -out dsa_params.pem 2048 - -dsa_private.pem: dsa_params.pem - openssl gendsa -out dsa_private.pem dsa_params.pem - -dsa_private_encrypted.pem: dsa_private.pem - openssl dsa -aes256 -in dsa_private.pem -passout 'pass:password' -out dsa_private_encrypted.pem - -dsa_private_pkcs8.pem: dsa_private.pem - openssl pkcs8 -topk8 -inform PEM -outform PEM -in dsa_private.pem -out dsa_private_pkcs8.pem -nocrypt - -dsa_public.pem: dsa_private.pem - openssl dsa -in dsa_private.pem -pubout -out dsa_public.pem - dsa1025.pem: openssl dsaparam -out dsa1025.pem 1025 @@ -612,67 +562,6 @@ dsa_private_encrypted_1025.pem: dsa_public_1025.pem: openssl dsa -in dsa_private_1025.pem -pubout -out dsa_public_1025.pem -rsa_private.pem: - openssl genrsa -out rsa_private.pem 2048 - -rsa_private_encrypted.pem: rsa_private.pem - openssl rsa -aes256 -in rsa_private.pem -passout 'pass:password' -out rsa_private_encrypted.pem - -rsa_private_pkcs8.pem: rsa_private.pem - openssl pkcs8 -topk8 -inform PEM -outform PEM -in rsa_private.pem -out rsa_private_pkcs8.pem -nocrypt - -rsa_private_pkcs8_bad.pem: rsa_private_pkcs8.pem - sed 's/PRIVATE/RSA PRIVATE/g' rsa_private_pkcs8.pem > rsa_private_pkcs8_bad.pem - -rsa_public.pem: rsa_private.pem - openssl rsa -in rsa_private.pem -pubout -out rsa_public.pem - -rsa_cert.crt: rsa_private.pem - openssl req -new -x509 -key rsa_private.pem -config rsa_cert.cnf -out rsa_cert.crt - -rsa_cert.pfx: rsa_cert.crt - openssl pkcs12 -export -passout 'pass:sample' -inkey rsa_private.pem -in rsa_cert.crt -out rsa_cert.pfx - -rsa_ca.crt: rsa_cert.crt - cp rsa_cert.crt rsa_ca.crt - -rsa_public_sha1_signature_signedby_rsa_private.sha1: rsa_public.pem rsa_private.pem - openssl dgst -sha1 -sign rsa_private.pem -out rsa_public_sha1_signature_signedby_rsa_private.sha1 rsa_public.pem - -rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1: rsa_public.pem rsa_private_pkcs8.pem - openssl dgst -sha1 -sign rsa_private_pkcs8.pem -out rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1 rsa_public.pem - -rsa_private_b.pem: - openssl genrsa -out rsa_private_b.pem 2048 - -I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256: rsa_private_b.pem - echo -n "I AM THE WALRUS" | openssl dgst -sha256 -sign rsa_private_b.pem -out I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 - -rsa_public_b.pem: rsa_private_b.pem - openssl rsa -in rsa_private_b.pem -pubout -out rsa_public_b.pem - -# The following 'foafssl' cert is used in test/parallel/test-https-foafssl.js. -# It requires a SAN like 'http://example.com/#me'. More info here: -# https://www.w3.org/wiki/Foaf+ssl -rsa_cert_foafssl_b.crt: rsa_private_b.pem - openssl req -new -x509 -config rsa_cert_foafssl_b.cnf -key rsa_private_b.pem -out rsa_cert_foafssl_b.crt - -# The 'modulus=' in the output must be stripped out -rsa_cert_foafssl_b.modulus: rsa_cert_foafssl_b.crt - openssl x509 -modulus -in rsa_cert_foafssl_b.crt -noout | cut -c 9- > rsa_cert_foafssl_b.modulus - -# Have to parse out the hex exponent -rsa_cert_foafssl_b.exponent: rsa_cert_foafssl_b.crt - openssl x509 -in rsa_cert_foafssl_b.crt -text | grep -o 'Exponent:.*' | sed 's/\(.*(\|).*\)//g' > rsa_cert_foafssl_b.exponent - -# openssl outputs `SPKAC=[SPKAC]`. That prefix needs to be removed to work with node -rsa_spkac.spkac: rsa_private.pem - openssl spkac -key rsa_private.pem -challenge this-is-a-challenge | cut -c 7- > rsa_spkac.spkac - -# cutting characters from the start to invalidate the spkac -rsa_spkac_invalid.spkac: rsa_spkac.spkac - cat rsa_spkac.spkac | cut -c 5- > rsa_spkac_invalid.spkac - rsa_private_1024.pem: openssl genrsa -out rsa_private_1024.pem 1024 @@ -709,30 +598,6 @@ rsa_pss_public_2048_sha256_sha256_16.pem: rsa_pss_private_2048_sha256_sha256_16. rsa_pss_public_2048_sha512_sha256_20.pem: rsa_pss_private_2048_sha512_sha256_20.pem openssl pkey -in rsa_pss_private_2048_sha512_sha256_20.pem -pubout -out rsa_pss_public_2048_sha512_sha256_20.pem -ed25519_private.pem: - openssl genpkey -algorithm ED25519 -out ed25519_private.pem - -ed25519_public.pem: ed25519_private.pem - openssl pkey -in ed25519_private.pem -pubout -out ed25519_public.pem - -x25519_private.pem: - openssl genpkey -algorithm x25519 -out x25519_private.pem - -x25519_public.pem: x25519_private.pem - openssl pkey -in x25519_private.pem -pubout -out x25519_public.pem - -ed448_private.pem: - openssl genpkey -algorithm ed448 -out ed448_private.pem - -ed448_public.pem: ed448_private.pem - openssl pkey -in ed448_private.pem -pubout -out ed448_public.pem - -x448_private.pem: - openssl genpkey -algorithm x448 -out x448_private.pem - -x448_public.pem: x448_private.pem - openssl pkey -in x448_private.pem -pubout -out x448_public.pem - clean: rm -f *.pfx *.pem *.srl ca2-database.txt ca2-serial fake-startcom-root-serial *.print *.old fake-startcom-root-issued-certs/*.pem @> fake-startcom-root-database.txt diff --git a/test/fixtures/keys/dsa_params.pem b/test/fixtures/keys/dsa_params.pem deleted file mode 100644 index 9052393fd2ebbe..00000000000000 --- a/test/fixtures/keys/dsa_params.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN DSA PARAMETERS----- -MIICLQKCAQEAoSw3Ghf02sMSmd5k2rvSqf6eJPFO7fHDRyvDDbifjO6/BKSIkXM4 -3qyCqddC04arKg7wc1QDEQ8gb13pCmnC0RBiljE6ke4yK46Q5JjiEKH9U1eCbtTr -hcGrLDgwbqvRM06EN6IfAL3OBF6YzS9wn3/EfSwW2Z8gAIkjZrTjEUTV+/gEAdfE -gd/WAZxcc9zYKOwPy0/LjjldQw5fsPlIEkS1yJFlWMokSsZVYlJLR06h1S4kQoE3 -BqELirH/FQfJ36RMRFsaKZ6nQYS66Qc8rybQw2VlOJsqiRoTSDwREPz6j9oLYh1E -e86j5Xt9jbiBrK33UbkTr/jBtO0J2PR0+wIhAIXIexS5LQJPSoi96k6OU4yrLLmA -IY8gS9mdYTdbpwcdAoIBAQCCN3gTjFiPgBQ/bj/Edp9w90SA+dQ/VnnYDTMcz+Mi -/8sgtlQ3O9CCFb0327YnOLwvxsmSadT9XrIq1/5jGD2VtjFDVlridjYASrjezR2k -dr781G+bxtVNQuIOKZl9xqruCmHUSSRL/vuCR6pKsA81ZPfpdcLh3RYYxDIoTK6t -VX4GrX5bcxGDIUCQiTaqKv9Nzpm1liBLRm6LHczBsFk2OVrRyMsT3gh0J6DSUw+d -w/Vru1J6glkrr0CxBWoJ65btcqtFyQV/76btor9Qgc/z9suYBoJZ3Ua0yAfv3J2E -rOs1CAbh4LWNULA9eJObY2R4sAV7Q8wOMT5jmjKo4unp ------END DSA PARAMETERS----- diff --git a/test/fixtures/keys/dsa_private.pem b/test/fixtures/keys/dsa_private.pem deleted file mode 100644 index 3f64ae4e85f0d4..00000000000000 --- a/test/fixtures/keys/dsa_private.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIDVwIBAAKCAQEAoSw3Ghf02sMSmd5k2rvSqf6eJPFO7fHDRyvDDbifjO6/BKSI -kXM43qyCqddC04arKg7wc1QDEQ8gb13pCmnC0RBiljE6ke4yK46Q5JjiEKH9U1eC -btTrhcGrLDgwbqvRM06EN6IfAL3OBF6YzS9wn3/EfSwW2Z8gAIkjZrTjEUTV+/gE -AdfEgd/WAZxcc9zYKOwPy0/LjjldQw5fsPlIEkS1yJFlWMokSsZVYlJLR06h1S4k -QoE3BqELirH/FQfJ36RMRFsaKZ6nQYS66Qc8rybQw2VlOJsqiRoTSDwREPz6j9oL -Yh1Ee86j5Xt9jbiBrK33UbkTr/jBtO0J2PR0+wIhAIXIexS5LQJPSoi96k6OU4yr -LLmAIY8gS9mdYTdbpwcdAoIBAQCCN3gTjFiPgBQ/bj/Edp9w90SA+dQ/VnnYDTMc -z+Mi/8sgtlQ3O9CCFb0327YnOLwvxsmSadT9XrIq1/5jGD2VtjFDVlridjYASrje -zR2kdr781G+bxtVNQuIOKZl9xqruCmHUSSRL/vuCR6pKsA81ZPfpdcLh3RYYxDIo -TK6tVX4GrX5bcxGDIUCQiTaqKv9Nzpm1liBLRm6LHczBsFk2OVrRyMsT3gh0J6DS -Uw+dw/Vru1J6glkrr0CxBWoJ65btcqtFyQV/76btor9Qgc/z9suYBoJZ3Ua0yAfv -3J2ErOs1CAbh4LWNULA9eJObY2R4sAV7Q8wOMT5jmjKo4unpAoIBAQCE1m+DUb9L -T58u6XV/L1p6K9T2mc6jAmzD51fPiUwsRov9sDGJmSnQjQ5pt3hVp8inVfNkhqOI -1rpdKmx5W00fPu6VCiPuximuHSNHzJpCAVUrIH8YasS+AurCOwGMdvODLF6dx7yR -MdxbiszrBry8J0TdvqElHZ1YmQDwoHH7R4pUd31jsk4gnE6pkqLgWwVAy0LXXGsg -2JfnDvdQY8fIHkuezLdhOyO9pRlXSYv4fLdMaSjHyEcwr2hnm5tm5RsBwM+u0sDc -yBqUjwoN8NTuLLasfJzzmjeHWDcRGFbzKt/xlUkQ7pf+xdelnLOstuPDGglB1U85 -REhx4rQGKg7nAiA0FX4e4Ms3OXUnmtsTALk5YMiMF3jUp4pRDhHFKBgsYQ== ------END DSA PRIVATE KEY----- diff --git a/test/fixtures/keys/dsa_private_encrypted.pem b/test/fixtures/keys/dsa_private_encrypted.pem deleted file mode 100644 index 49b3375baf7194..00000000000000 --- a/test/fixtures/keys/dsa_private_encrypted.pem +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,FABA263DD471F214EF3E02699B837C20 - -Tj2+4x9MEIaQGFQ4o7hk12MriVYyvLO5aCbqq7LG5uhVk546/+bJc6hewdSwb6oT -MYPbuV+QTdtqshqFESA0McyGlj4w1tOg5TomP84NTKvwTO1EirVLMukfF3dqaguw -C117AZJkGbqgbi6lZ2bG0Hta6HRbhI5+ODFtOp3rKQ2KwVmtL7zw6vt3PCISeMHN -fLqikDc2+YoI9V1FJis9/FATyqV8yrJYYQQpP1RQN+gDY4SSs/eUr+Me7RNy6Lz7 -oH0tDaPGbiafwrZe1okksjxT2JQz1Q3hciBPikgdQIoE2NWTUlOeRYX0T0N2n37S -6Odbcr522e+2XjcLj34Ozthp+Q5mIDcLuakazxkXhq0RyhJ7vo+xA2YiP7Q3vH7g -oAnsJPFNVY6wJhprZi2VofKIUJUiajAXGDVX2yEIG/DOA9rnx0ZP+zopXMi4ptu0 -RzWyAL+P4jn0b8vgPf9CYJmn4VNfOcVmomZ1Bw6hzqTE2FnThJCXU3l2eaC/wcSR -uMRp8c6IM8AR5DUzUBKIckkvXj1m5iSZoKuR8dB7s9BhrRtBAI7K3G254G06sByv -0pnft8r+BkMqgdfG4rJQoQJw7tVYln+pL/gYPDuYsqyJ9kFuHDqtBvlozqXY5AL1 -XQaXoD6xMACEoJSIv5y+TzFzXwFQrDW+G1724YOSbiioUfGD0tRfjj2ei63PThQr -Z50SryfKQQf4UgcJeokMhmRWT2vPXEFWEP1b2FMEQxBy6fyKcqwZBAbhqF6usGEB -nwr/S1HXQAGEsWoc/Z4yynB7uhOwWu/Vpj+V6B98NmC7EUX15Why8zCsT9gzaIgC -M6sZafHhcmjfwc+lL9xFlU/wnAOz0LeKZWry3D0sXZn1r2FRlOJdtLLx01Sve/MU -ZRsgEDTkzv8E9dDltMeq8HQDCgLT1USTMWcY1kMELBj7y7ZdCWjH1QhTq2KlId+o -1X28zJOsOL/XRseUSlpjmSSLRw1QQEypNCY2+tcvViAvn3AifipBbdzUNhvygLhc -a2+5rYsd8BBEFnMJx7lDiyqXGnZkBbhbCSIudppNcjC+akFlFp6fBzkp4mKBuKpc -hwBBdfqdEyzqu6SVHM8nGV/aDoRuu9shV6MX0y/KnIgLedudn8aN2eLgjR5k1+99 ------END DSA PRIVATE KEY----- diff --git a/test/fixtures/keys/dsa_private_pkcs8.pem b/test/fixtures/keys/dsa_private_pkcs8.pem deleted file mode 100644 index 8e4be9e7224fd1..00000000000000 --- a/test/fixtures/keys/dsa_private_pkcs8.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICZQIBADCCAjoGByqGSM44BAEwggItAoIBAQChLDcaF/TawxKZ3mTau9Kp/p4k -8U7t8cNHK8MNuJ+M7r8EpIiRczjerIKp10LThqsqDvBzVAMRDyBvXekKacLREGKW -MTqR7jIrjpDkmOIQof1TV4Ju1OuFwassODBuq9EzToQ3oh8Avc4EXpjNL3Cff8R9 -LBbZnyAAiSNmtOMRRNX7+AQB18SB39YBnFxz3Ngo7A/LT8uOOV1DDl+w+UgSRLXI -kWVYyiRKxlViUktHTqHVLiRCgTcGoQuKsf8VB8nfpExEWxopnqdBhLrpBzyvJtDD -ZWU4myqJGhNIPBEQ/PqP2gtiHUR7zqPle32NuIGsrfdRuROv+MG07QnY9HT7AiEA -hch7FLktAk9KiL3qTo5TjKssuYAhjyBL2Z1hN1unBx0CggEBAII3eBOMWI+AFD9u -P8R2n3D3RID51D9WedgNMxzP4yL/yyC2VDc70IIVvTfbtic4vC/GyZJp1P1esirX -/mMYPZW2MUNWWuJ2NgBKuN7NHaR2vvzUb5vG1U1C4g4pmX3Gqu4KYdRJJEv++4JH -qkqwDzVk9+l1wuHdFhjEMihMrq1VfgatfltzEYMhQJCJNqoq/03OmbWWIEtGbosd -zMGwWTY5WtHIyxPeCHQnoNJTD53D9Wu7UnqCWSuvQLEFagnrlu1yq0XJBX/vpu2i -v1CBz/P2y5gGglndRrTIB+/cnYSs6zUIBuHgtY1QsD14k5tjZHiwBXtDzA4xPmOa -Mqji6ekEIgIgNBV+HuDLNzl1J5rbEwC5OWDIjBd41KeKUQ4RxSgYLGE= ------END PRIVATE KEY----- diff --git a/test/fixtures/keys/dsa_public.pem b/test/fixtures/keys/dsa_public.pem deleted file mode 100644 index 7d2f2c63bc8e0e..00000000000000 --- a/test/fixtures/keys/dsa_public.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIDSDCCAjoGByqGSM44BAEwggItAoIBAQChLDcaF/TawxKZ3mTau9Kp/p4k8U7t -8cNHK8MNuJ+M7r8EpIiRczjerIKp10LThqsqDvBzVAMRDyBvXekKacLREGKWMTqR -7jIrjpDkmOIQof1TV4Ju1OuFwassODBuq9EzToQ3oh8Avc4EXpjNL3Cff8R9LBbZ -nyAAiSNmtOMRRNX7+AQB18SB39YBnFxz3Ngo7A/LT8uOOV1DDl+w+UgSRLXIkWVY -yiRKxlViUktHTqHVLiRCgTcGoQuKsf8VB8nfpExEWxopnqdBhLrpBzyvJtDDZWU4 -myqJGhNIPBEQ/PqP2gtiHUR7zqPle32NuIGsrfdRuROv+MG07QnY9HT7AiEAhch7 -FLktAk9KiL3qTo5TjKssuYAhjyBL2Z1hN1unBx0CggEBAII3eBOMWI+AFD9uP8R2 -n3D3RID51D9WedgNMxzP4yL/yyC2VDc70IIVvTfbtic4vC/GyZJp1P1esirX/mMY -PZW2MUNWWuJ2NgBKuN7NHaR2vvzUb5vG1U1C4g4pmX3Gqu4KYdRJJEv++4JHqkqw -DzVk9+l1wuHdFhjEMihMrq1VfgatfltzEYMhQJCJNqoq/03OmbWWIEtGbosdzMGw -WTY5WtHIyxPeCHQnoNJTD53D9Wu7UnqCWSuvQLEFagnrlu1yq0XJBX/vpu2iv1CB -z/P2y5gGglndRrTIB+/cnYSs6zUIBuHgtY1QsD14k5tjZHiwBXtDzA4xPmOaMqji -6ekDggEGAAKCAQEAhNZvg1G/S0+fLul1fy9aeivU9pnOowJsw+dXz4lMLEaL/bAx -iZkp0I0Oabd4VafIp1XzZIajiNa6XSpseVtNHz7ulQoj7sYprh0jR8yaQgFVKyB/ -GGrEvgLqwjsBjHbzgyxence8kTHcW4rM6wa8vCdE3b6hJR2dWJkA8KBx+0eKVHd9 -Y7JOIJxOqZKi4FsFQMtC11xrINiX5w73UGPHyB5Lnsy3YTsjvaUZV0mL+Hy3TGko -x8hHMK9oZ5ubZuUbAcDPrtLA3MgalI8KDfDU7iy2rHyc85o3h1g3ERhW8yrf8ZVJ -EO6X/sXXpZyzrLbjwxoJQdVPOURIceK0BioO5w== ------END PUBLIC KEY----- diff --git a/test/fixtures/keys/ed25519_private.pem b/test/fixtures/keys/ed25519_private.pem deleted file mode 100644 index f837457cbd4f23..00000000000000 --- a/test/fixtures/keys/ed25519_private.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN PRIVATE KEY----- -MC4CAQAwBQYDK2VwBCIEIMFSujN0jIUIdzSvuxka0lfgVVkMdRTuaVvIYUHrvzXQ ------END PRIVATE KEY----- diff --git a/test/fixtures/keys/ed25519_public.pem b/test/fixtures/keys/ed25519_public.pem deleted file mode 100644 index 4127a471bac9f5..00000000000000 --- a/test/fixtures/keys/ed25519_public.pem +++ /dev/null @@ -1,3 +0,0 @@ ------BEGIN PUBLIC KEY----- -MCowBQYDK2VwAyEAK1wIouqnuiA04b3WrMa+xKIKIpfHetNZRv3h9fBf768= ------END PUBLIC KEY----- diff --git a/test/fixtures/keys/ed448_private.pem b/test/fixtures/keys/ed448_private.pem deleted file mode 100644 index 9643665d67656d..00000000000000 --- a/test/fixtures/keys/ed448_private.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PRIVATE KEY----- -MEcCAQAwBQYDK2VxBDsEOdOtCnu9bDdBqSHNNZ5xoDA5KdLBTUNPcKFaOADNX32s -dfpo52pCtPqfku/l3/OfUHsF43EfZsaaWA== ------END PRIVATE KEY----- diff --git a/test/fixtures/keys/ed448_public.pem b/test/fixtures/keys/ed448_public.pem deleted file mode 100644 index b767109b187ee2..00000000000000 --- a/test/fixtures/keys/ed448_public.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN PUBLIC KEY----- -MEMwBQYDK2VxAzoAoX/ee5+jlcU53+BbGRsGIzly0V+SZtJ/oGXY0udf84q2hTW2 -RdstLktvwpkVJOoNb7oDgc2V5ZUA ------END PUBLIC KEY----- diff --git a/test/fixtures/keys/rsa_ca.crt b/test/fixtures/keys/rsa_ca.crt deleted file mode 100644 index ef94a341846101..00000000000000 --- a/test/fixtures/keys/rsa_ca.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIUOLbA0Gyeqh/vqRSR98jmSKzv3aswDQYJKoZIhvcNAQEL -BQAwgbAxCzAJBgNVBAYTAlVLMRQwEgYDVQQIDAtBY2tuYWNrIEx0ZDETMBEGA1UE -BwwKUmh5cyBKb25lczEQMA4GA1UECgwHbm9kZS5qczEdMBsGA1UECwwUVGVzdCBU -TFMgQ2VydGlmaWNhdGUxFDASBgNVBAsMC0VuZ2luZWVyaW5nMRIwEAYDVQQDDAls -b2NhbGhvc3QxGzAZBgkqhkiG9w0BCQEWDGFsZXhAYXViLmRldjAeFw0xOTA1Mjky -MDI5NTBaFw0xOTA2MjgyMDI5NTBaMIGwMQswCQYDVQQGEwJVSzEUMBIGA1UECAwL -QWNrbmFjayBMdGQxEzARBgNVBAcMClJoeXMgSm9uZXMxEDAOBgNVBAoMB25vZGUu -anMxHTAbBgNVBAsMFFRlc3QgVExTIENlcnRpZmljYXRlMRQwEgYDVQQLDAtFbmdp -bmVlcmluZzESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxhbGV4 -QGF1Yi5kZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC33FiIiiex -wLe/P8DZx5HsqFlmUO7/lvJ7necJVNwqdZ3ax5jpQB0p6uxfqeOvzcN3k5V7UFb/ -Am+nkSNZMAZhsWzCU2Z4Pjh50QYz3f0Hour7/yIGStOLyYY3hgLK2K8TbhgjQPhd -kw9+QtKlpvbL8fLgONAoGrVOFnRQGcr70iFffsm79mgZhKVMgYiHPJqJgGHvCtkG -g9zMgS7p63+Q3ZWedtFS2RhMX3uCBy/mH6EOlRCNBbRmA4xxNzyf5GQaki3T+Iz9 -tOMjdPP+CwV2LqEdylmBuik8vrfTb3qIHLKKBAI8lXN26wWtA3kN4L7NP+cbKlCR -lqctvhmylLH1AgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQAD -ggEBAFeDkFYcL1pcVA3q1LNWmpDi9MQAOajSyk3bNj0+ckyuOlqaXH2gVAdQh+XB -LOFDXNwAAqMe7FEoyvIaQSFcatRhQnKFxQ9i0o1T8+6Aebjj5oo8lY5CGyOacQV8 -C6LMl4gd/duIoaWkjykiGjTH8SR6VXYhPTm03wQSMMX664E/8onsw6cLuz4COB9q -dhWhkBXiVj3fF9kLOYMiBWc7Mb2Glfs3NLpu7TTltOwNNMWNfzE9XByR7Tg4WtIu -8x45ibQKqUhHCh/jpWns2g/YZXXBrcvYREgakkvJZLV2Z+xeoV5oY071554BfMms -YxLnHtl1YKNg++DSmxeUNK+NLZA= ------END CERTIFICATE----- diff --git a/test/fixtures/keys/rsa_cert.cnf b/test/fixtures/keys/rsa_cert.cnf deleted file mode 100644 index 5d30534012e40f..00000000000000 --- a/test/fixtures/keys/rsa_cert.cnf +++ /dev/null @@ -1,23 +0,0 @@ -[ req ] -days = 99999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -x509_extensions = v3_ca - -[ req_distinguished_name ] -C = UK -ST = Acknack Ltd -L = Rhys Jones -O = node.js -0.OU = Test TLS Certificate -1.OU = Engineering -CN = localhost -emailAddress = alex@aub.dev - -[ req_attributes ] - -[ v3_ca ] -basicConstraints = CA:TRUE - -[ x509_extensions ] \ No newline at end of file diff --git a/test/fixtures/keys/rsa_cert.crt b/test/fixtures/keys/rsa_cert.crt deleted file mode 100644 index ef94a341846101..00000000000000 --- a/test/fixtures/keys/rsa_cert.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIUOLbA0Gyeqh/vqRSR98jmSKzv3aswDQYJKoZIhvcNAQEL -BQAwgbAxCzAJBgNVBAYTAlVLMRQwEgYDVQQIDAtBY2tuYWNrIEx0ZDETMBEGA1UE -BwwKUmh5cyBKb25lczEQMA4GA1UECgwHbm9kZS5qczEdMBsGA1UECwwUVGVzdCBU -TFMgQ2VydGlmaWNhdGUxFDASBgNVBAsMC0VuZ2luZWVyaW5nMRIwEAYDVQQDDAls -b2NhbGhvc3QxGzAZBgkqhkiG9w0BCQEWDGFsZXhAYXViLmRldjAeFw0xOTA1Mjky -MDI5NTBaFw0xOTA2MjgyMDI5NTBaMIGwMQswCQYDVQQGEwJVSzEUMBIGA1UECAwL -QWNrbmFjayBMdGQxEzARBgNVBAcMClJoeXMgSm9uZXMxEDAOBgNVBAoMB25vZGUu -anMxHTAbBgNVBAsMFFRlc3QgVExTIENlcnRpZmljYXRlMRQwEgYDVQQLDAtFbmdp -bmVlcmluZzESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxhbGV4 -QGF1Yi5kZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC33FiIiiex -wLe/P8DZx5HsqFlmUO7/lvJ7necJVNwqdZ3ax5jpQB0p6uxfqeOvzcN3k5V7UFb/ -Am+nkSNZMAZhsWzCU2Z4Pjh50QYz3f0Hour7/yIGStOLyYY3hgLK2K8TbhgjQPhd -kw9+QtKlpvbL8fLgONAoGrVOFnRQGcr70iFffsm79mgZhKVMgYiHPJqJgGHvCtkG -g9zMgS7p63+Q3ZWedtFS2RhMX3uCBy/mH6EOlRCNBbRmA4xxNzyf5GQaki3T+Iz9 -tOMjdPP+CwV2LqEdylmBuik8vrfTb3qIHLKKBAI8lXN26wWtA3kN4L7NP+cbKlCR -lqctvhmylLH1AgMBAAGjEDAOMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQAD -ggEBAFeDkFYcL1pcVA3q1LNWmpDi9MQAOajSyk3bNj0+ckyuOlqaXH2gVAdQh+XB -LOFDXNwAAqMe7FEoyvIaQSFcatRhQnKFxQ9i0o1T8+6Aebjj5oo8lY5CGyOacQV8 -C6LMl4gd/duIoaWkjykiGjTH8SR6VXYhPTm03wQSMMX664E/8onsw6cLuz4COB9q -dhWhkBXiVj3fF9kLOYMiBWc7Mb2Glfs3NLpu7TTltOwNNMWNfzE9XByR7Tg4WtIu -8x45ibQKqUhHCh/jpWns2g/YZXXBrcvYREgakkvJZLV2Z+xeoV5oY071554BfMms -YxLnHtl1YKNg++DSmxeUNK+NLZA= ------END CERTIFICATE----- diff --git a/test/fixtures/keys/rsa_cert.pfx b/test/fixtures/keys/rsa_cert.pfx deleted file mode 100644 index 627f27bc7fe14d260d11d1e68d3be27369e9fa8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2629 zcmV-L3cB?$f(k(b0Ru3C3I_%WDuzgg_YDCD0ic2j_ymFp^e}=6@Gyb|rv?cshDe6@ z4FLxRpn?RLFoFb>0s#Opf&`5Q2`Yw2hW8Bt2LUh~1_~;MNQU8S zPEK;-&;-IL!+jVJ*t36KfTXxRXzyt3x}jDYiu@9E)J9LF>r^^`deMBaga6^WeqtW~ zRPB+e=0#h%jefzwZgIGI`_(Q(JaTPTyB-_+!BV`tr48R=y;8a1JV8KVz_ZE}n=Am( z$0-3@Uwl5!u&Gt(DBU>&B8$q5tw;JLyzt9K`H&R=!xrh}75Ml3^gK~@CW^DVdo~Q! z>a6-f5AznG=I6Tb=0h(oqzT}Sig@6_W~Q@UHEk@YrBp-1_ray-llfwbgz5)zydxaj z)xz9UUZ*@6bTJ#j)lb0d_r*BGT-iXLHfmp&EZx;$Q1!1d8QCm}?M z+J9|F50$}ORd>l$g#019YM$Kvuk-`hU#v^yJGuxmes(_5?ZaSUX-ujIDmn|nCIO0# zkJK4ZCvJHan#3VL3HTmAF`0@e2-AUv=6ZIzJ99BS%v7Z?#anx+*PtFR?v#NTtS@p* zrCghU0{Hcm0EwwHLd-ekG*w6tp+O}mh zRYvyYhUaI;@>8eXXq2|v#I$rqC{Y^18N=2riEW`wZ$c>rQ2f8NO)vW;^VQLTD%S$x z#87`mHyWC*T;$}AyObrp+y-L!6k{e=+So?aadQ10Jsl}U*lbCcrZycAEAwb0HHV&) zRX8x=QeMBs534%Q)>Hv-Tc7MjM9@1h5E~ZjX|s@tEnFzJ)D8nk|QE*armbWc|R zNI*LB*WVX}^2IAcr?L}pQ@sM7qc{I;&_0TK&M2Mg{{OEQA^_ciKUq5(g`__YV3$^t z8%(bJzzmq8dl}5DSbd({5g}nOQVA09nSiM~;#w zsln1WAU0SStd~Y$!Cbq%*hW^qFdnq8E)78Ip`X}9fa=E(G=wDsRL5?y+Dzc|5fRQ& zu$2hO=)8BA#;o=2n`pd@q(%?mWJM=g{c zX3S63<11~$td)LbSq*fx-<$o#`$?YLWC`t3Ww!US5nt6A?3{0CuqsQ?teRron`~gS7qF3fmZABCC#jof!YSGgcz=57w<=FwbN~duP+{i z@of}0p8{X|HA4-8t@+&LNQU`K==>3~KUJQ7G83xE|1smVG?-)_`z?7P2e!Fu;<)Fi!V0 z_;?h`^AKl^@B!r+`-_p^+07I8tn2jsY`zRE9Y;Bfcbw!em%T9+8kk8AD@yn4aUj#* z{0tcBF}GY+ujG%I(kA9tI*y;p2BF#Fc^~2@INbfA+&b7g zg<$P88!e8H9sxE9zhW~zGS#r?lN4zSDNOJCSN2^8bR4}!9`9?eV(nl1=$=r8Dl(%* zmBRaJMLi%+nyPbOuya(;JNS?{wN67QfI@!a*ipwNOKdi)L|dD6%-a)yDU9>p_CXP!|MIg`G*K z7K|KP02ZiAPayiBq^Axtm+XVbM|!clXhkqawZ#DilAn!LOMR!-TOFK7q|#WUo#Kr3 zRW30M2<;0AJkLpM3CNjoH_u@D?hoN1QGw+cuN}HDX0wv;-zFo&qQLFq7n3dOawuh* z>mV90?gEj(*h#8AmmfCobQ1K4ZcN9fKhmnhP-fj9N#pAAb0DRG$30Nu-4okW)q-Jguc8GYps5mUFD9a!ZD7!wrGeXBjE@C@m zcR;W7x|g4U?>X@l8u1pl{fp3E?6d?2EM`W{bV`}sf>N@~52{Blp@q|5bfD4q*f<4; zqqJ1mx7KUx{rSuTxKMg{^*nfo{PE3J1dG@>q!CIQoEh% zOLR|2Y!8coBeLlk*z8Xt36#5%td>*?rTL=zBUBw|zoI8CdlZAF2`LZ>j2W743ij3e4JkVl)Gxyoj0_kl1WcRb5aiS`>$fQsebRX-M=dVlPtjYtZ`4v^i0R1iIHiN zMM1-KXt@5N=qT?vSH!%fsHyzO?xaO7dLHVQp|k3PH~H`a(a6V6fm}f3QZCk)s3jql zzY9uUJ<#OQ5wM2v>Mxe6l&ZC9@b76-O{wpKR+c*)F&|IOZm>;i!>x;udB$`+IH+$R zolCK}zLj;({AB(h%>h>{vOGDO@+`S>`>CzkZ4qZcaHSWbYt�mxd4E�c(�9��ȴ� �k��L�����2��+��q�Si��2:���[dfj/���5П�9�O<���8��'. O��eL�8���2�t�ӟ/��3�K����,��Њ�l��Zڅ�t�[��4�f��#�* �Y� ��餡w/���2ߗfꢅ�X��h�aYt�mxd4E�c(�9��ȴ� �k��L�����2��+��q�Si��2:���[dfj/���5П�9�O<���8��'. O��eL�8���2�t�ӟ/��3�K����,��Њ�l��Zڅ�t�[��4�f��#�* �Y� ��餡w/���2ߗfꢅ�X��h�aF6 zh)^CAA_-v-$&@Z46VCQ}RhY`Z<5fS~5!>%1iaWE968o&3b z==?Si2nAeag5FHEP`Ac{^z2cYd68lqm+gRSeHX_}Y7@=CyhQmtVpxVUa=qXx&-V1k z{(ANvP%1OEgBL^;K}QaE``#3Nab@?Pq;$Y@ZOuCd8EN2$h1v~|5vXg}2r0RD&Y^VQ zlbz-H37xJpaP0o)#R0{frv})=CFE_F?0qd?_-@M@+yVRvqp$wdF*?sOKISBImNa3* zw>z?e&59!oIook7rSK{O7}Zw`-D$})lX=xi+ufzQb*$kVQ8!Q_Z2Ukg$Ly0|KV($q zYpaoLPQ8TILDIvbz|;OD`U3*Ao1O-{!119Tvu2BxO%8l&Wr>*po0EUH%M+@~oJ)Q-kFiaDH;~$ju+^!ubTVdn2qoG!X&zTpj@dzxh4k05xORT85d9Py$<_2&TjTb)EC=v*MB1U-D2 zcYEc;3~8Ycy77AaGjy!Nu-T@|B3kLptm*S!bIE2OmjKDq_Q74X=)$-J?a4D2r{w#gzNHMgUb4#_4HL%wzgJ;Lew9kRYwdp{w20oq_t{7>wO`I4E#-qu1Axlgb=8lt)oZ(K2e97($BNdR`L}9+NA@ zVPy?%>DjNFW}8=VQte-$yb&Yc$nVmk#3QU?+FK(hwL=5lt`D46S4AB@6`{yAe$8zw z-4aJLQ=yGbM-L{KsZ*TTHLH2{ioF8kZ-Q1ay{+@@_@{0hu%g+4)~dO7qD4`0Y_PjG zB;VJ{>5@i3J*!rh(9Vs{#ZSTk)Nn3xA}QZ_kp1z>+=HMXREM|LNc08Zt#KjM@#C1$)8G> zf;(6eNe4<9J$3K-mmf^~-JAb9XZI>$9-zfif2RIKAhXn@e^!1|M8>K3xWA|85}uKb zfs`HP4G3Z>QEZFG?(%#oh?2-RU5H@}@#cOthTJDW2+;BQ{v2r8U>6 zbpvDZSY|$jaybLzIw{NOU`Kf)qA9(9PHrG(D2l8I*GvzyWfEQkr}n>8!*=6kz(`C~ z{lM7jduKW!GYUuzJLEKTdkBZeso-ED!dP(-P+k}SMyma`FFOq}T57we%T9-i$x|j* S8Gxb3C+JEY^Q3!!r~5DRBW1w= literal 0 HcmV?d00001 diff --git a/test/fixtures/test_dsa_params.pem b/test/fixtures/test_dsa_params.pem new file mode 100644 index 00000000000000..70073722687ed2 --- /dev/null +++ b/test/fixtures/test_dsa_params.pem @@ -0,0 +1,14 @@ +-----BEGIN DSA PARAMETERS----- +MIICIAKCAQEAiJCR40HCtA6pk864XhKceke8N4chlrpwcphAXpHwSQGHlv1JJFyj +aPqugWtzwZH55g7qpIiT3fmg6V6PfzNfx4sQGlSjckZaN02WRUAacn0va6UbwyYV +7LZzuHlHzayHLl/btGeTF+zL+9eMLKfll+r+5bJXDMWh3xUD1Nldf+fsIsbVZI9Q +Nzf3L1/07XVTLedQYaE77OqVuu+cfoBtb+K5MsQdHMMN20BGjKIvGkJICuC448Gk +Dx1wpxz2vSJEi6FqXruM6c9yrPvhJKSfbVFYK2n82MMXMNNu9Dwqwsv6Ig6dIVyw +dKDrSw1Nz9j9TWA5BolNta3yMPHrEjCuIQIVAKq0ZZ0/36sZE1cqt6j0hZTisWUV +AoIBAFbI9MKn9DBJ7lo7+LRblgNKg9lk4D/6NBBRgOeCN4WnOxHQrqpSTUBG+VcA +BDKEfoHfEPI9KZKpEgpzGTpr7mGxDPLHfGL+vvf1EYbmcTDrUWlf9B/3+L3uwIdd +v3NYLepyEZ8L8g6eRGSQ4Svg1oSR/GAUTeGJczPg6qW0b/LTpf4eeDNWYGF6aogJ +UphnPcZ0Xqw+yvq/i1uzAVirUxp9Crb7km0dfA0G/HBiSdcEt6l8LdQd6qmcL0nx +cm9x6L+tSol5hXNynV0wcxdCQz4Xj5na+NoRGb9jPYxgLkoq07hwAkqkQDyF61tx +fWgGc7zmh/x6JMGe/Xhg1TvgxLs= +-----END DSA PARAMETERS----- diff --git a/test/fixtures/test_dsa_pkcs8_privkey.pem b/test/fixtures/test_dsa_pkcs8_privkey.pem new file mode 100644 index 00000000000000..3d15aa1162a97d --- /dev/null +++ b/test/fixtures/test_dsa_pkcs8_privkey.pem @@ -0,0 +1,15 @@ +-----BEGIN PRIVATE KEY----- +MIICZAIBADCCAjkGByqGSM44BAEwggIsAoIBAQC5CYW1vZHbx/Ytm+/m+oseHbre +kOd40VOSybqo6Us2NysFq+46rNlnR28Lkolg4nv+XK6YTlB3XbEwbibYa1uwCuAE +io/Zs2rfOpGNwp31Fg3pb8ZhFrnjmhrQhZfRT6bXXw3hvyXitjgQkwIsRL5OUYlQ +CEIbf+LsogikQez2+xaYYkqUqSYdb48IkVtDTMweWslpDKUmIfH1cy0osqMC97GR +8EXXvhK7sig2hhHtj+NFGA7majfEFmTd0mafZBlEFodqvkwV1q7TTMrDWgkO2lcc +2DEMjZ9on9xVszRhNCGIwuFJLhWBKfNZ59X7LUxEfkelpce0Kr5eFmxwN4n3AiEA +pK7pu7TqHqiIoGDmAyUm71gx3V5T3mNaih8Y/9h7dMsCggEAJNtfC6LqpU84UMz+ +nsxSch/ylDx1lyh3rOGZ9Wn+2tIhahI+hqDwmPeHvymzDHh2QjuXgzeZmo1753CB +CtYdU0GnumSEEUUCiTBbSsX6Zy0VI4w/Qy3WV5IoXXkF9YsbkC8JhPq9jHLa5Qt5 +59TF+347OFso5ae+XkkZ8C112UyKnYzvniqlbj0Cb4E7FadCzSggC9c2drYE12Mx +QEEbddAVNty5wpjh3Qd2y8kKPDSn4OCrSIXAL8WDXJk507RL5moqKnwis/3iPUXi +U7s8QmJP4B8Mn4vDM1O0rORCmz9KXz0f5M0lw39jdA/AG0fNNz86KCFTPdXz/Iz1 +ThphTQQiAiAhjvXffKp1V3nMiUUUsYzS2Msn14bBFiBwSdNgitRwEA== +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_dsa_privkey.pem b/test/fixtures/test_dsa_privkey.pem new file mode 100644 index 00000000000000..2056740af99718 --- /dev/null +++ b/test/fixtures/test_dsa_privkey.pem @@ -0,0 +1,20 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIDVQIBAAKCAQEAuQmFtb2R28f2LZvv5vqLHh263pDneNFTksm6qOlLNjcrBavu +OqzZZ0dvC5KJYOJ7/lyumE5Qd12xMG4m2GtbsArgBIqP2bNq3zqRjcKd9RYN6W/G +YRa545oa0IWX0U+m118N4b8l4rY4EJMCLES+TlGJUAhCG3/i7KIIpEHs9vsWmGJK +lKkmHW+PCJFbQ0zMHlrJaQylJiHx9XMtKLKjAvexkfBF174Su7IoNoYR7Y/jRRgO +5mo3xBZk3dJmn2QZRBaHar5MFdau00zKw1oJDtpXHNgxDI2faJ/cVbM0YTQhiMLh +SS4VgSnzWefV+y1MRH5HpaXHtCq+XhZscDeJ9wIhAKSu6bu06h6oiKBg5gMlJu9Y +Md1eU95jWoofGP/Ye3TLAoIBACTbXwui6qVPOFDM/p7MUnIf8pQ8dZcod6zhmfVp +/trSIWoSPoag8Jj3h78pswx4dkI7l4M3mZqNe+dwgQrWHVNBp7pkhBFFAokwW0rF ++mctFSOMP0Mt1leSKF15BfWLG5AvCYT6vYxy2uULeefUxft+OzhbKOWnvl5JGfAt +ddlMip2M754qpW49Am+BOxWnQs0oIAvXNna2BNdjMUBBG3XQFTbcucKY4d0HdsvJ +Cjw0p+Dgq0iFwC/Fg1yZOdO0S+ZqKip8IrP94j1F4lO7PEJiT+AfDJ+LwzNTtKzk +Qps/Sl89H+TNJcN/Y3QPwBtHzTc/OighUz3V8/yM9U4aYU0CggEAS8U79P4cax28 +Emh8kQqiLEyoo89LIsD+DiBuEpeSGb7ty29dP2eRIBce4AVHQ7D/Pwkm8bxnh5+Y +iDqD13344lZY32a5zMXmMnN1e/lPs21p/z7XO/5ggDzw+h7EQHPIAF87KvPFiO14 +Vi1m9IzG/Nmu4Flks+4IBXlsXxgLDbYjtuQuOhmU+VtIxiQbrbe+wVMhzzaDNMt/ +wXr5twAwWbPqJynPlodndElETz6dNLL0gW61uHN/CFsaMTLManftSifh5DJpglaL +yQ/2+uGje419/kOWOexZ8ysREKIBrhWhePolw8SAiygwbCUhgSbruWpJPpQOOtI5 +YTh2lIK0vAIgIY7133yqdVd5zIlFFLGM0tjLJ9eGwRYgcEnTYIrUcBA= +-----END DSA PRIVATE KEY----- diff --git a/test/fixtures/test_dsa_privkey_encrypted.pem b/test/fixtures/test_dsa_privkey_encrypted.pem new file mode 100644 index 00000000000000..11bc8fbdeee1c8 --- /dev/null +++ b/test/fixtures/test_dsa_privkey_encrypted.pem @@ -0,0 +1,16 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIICkjAcBgoqhkiG9w0BDAEDMA4ECLCAnNHA9e3tAgIIAASCAnC9H9ncbLh/TpT9 +jVecNZZ+udUB0qmaqIQ+qW03NJfrJdGhAd8tbhGb2hqIi4tLfOpUAQS93BfMXguM +hyVQWJLGreIm7ehIqXwwFJFts9WJWsS9UleHOTtKNQvft3Lkp29lR/DZtXsJfJbT +0gjjHFpGhaNnIEK8eRAoyXZTPLv6ZPvFp4szj7GjslP5dvkcBeXbgTlBAT4EVB9e +43tfF1J2wOnuIkQXvnZ5eVseYIbKpCjAU/ZkoZU6ySVvFkc3+NIB9qHqKsE4LKdp +wqhCuuh0b95TpiUoI+IIsLUbcGW7EZGwkVV2NxYZGpNehx5/kwGnH32KyDOqNVkm +y5sC96oRSXz9eAo69zC0LgFL4ZyHWa9gebgPXRSbegiLNt+wxE4arSPlwUaKWzlH +qEL2zzeVBIvuDwQ6SDMNiNv1GK68kaZ9AuR0jPn3COO2TgdWaigqrGPpNv8c/F2m +Hv1ex6FAJr88aglxU7K6gS7ayFtWZqdg4K7KIGrP8Ii/UCkzQxSnFRTFbjUJCK8A +5mM7/jpmUd/U6Ygl/QrtMjPBHN02CjTc3LZK92uUf0g1u838zX91FxvItzyockpg +rkZ5UWggZ2q0Hg7duYffjOR28d6u44JPIPJ9WIN2upsZoP1ABdUdazBRhpq9Da68 +7+lpZC5BGwhpiP93bB66T+QwjqLCDFygIaCii+vQq/814pk/i/7VBEVGm2iDjOx/ +Ng99ltKl+JDJ/lQwE27pp+JP+9Oe8uU94kelPA7w8xrj/YuukQbVY03+WYFag/Dn +uMJyKYOqm7LmHOQy8rggM9RjY6XQY0KV8BKX3wG+4zjARTLKRbo= +-----END ENCRYPTED PRIVATE KEY----- diff --git a/test/fixtures/test_dsa_pubkey.pem b/test/fixtures/test_dsa_pubkey.pem new file mode 100644 index 00000000000000..54d01bef7ae72c --- /dev/null +++ b/test/fixtures/test_dsa_pubkey.pem @@ -0,0 +1,20 @@ +-----BEGIN PUBLIC KEY----- +MIIDRjCCAjkGByqGSM44BAEwggIsAoIBAQC5CYW1vZHbx/Ytm+/m+oseHbrekOd4 +0VOSybqo6Us2NysFq+46rNlnR28Lkolg4nv+XK6YTlB3XbEwbibYa1uwCuAEio/Z +s2rfOpGNwp31Fg3pb8ZhFrnjmhrQhZfRT6bXXw3hvyXitjgQkwIsRL5OUYlQCEIb +f+LsogikQez2+xaYYkqUqSYdb48IkVtDTMweWslpDKUmIfH1cy0osqMC97GR8EXX +vhK7sig2hhHtj+NFGA7majfEFmTd0mafZBlEFodqvkwV1q7TTMrDWgkO2lcc2DEM +jZ9on9xVszRhNCGIwuFJLhWBKfNZ59X7LUxEfkelpce0Kr5eFmxwN4n3AiEApK7p +u7TqHqiIoGDmAyUm71gx3V5T3mNaih8Y/9h7dMsCggEAJNtfC6LqpU84UMz+nsxS +ch/ylDx1lyh3rOGZ9Wn+2tIhahI+hqDwmPeHvymzDHh2QjuXgzeZmo1753CBCtYd +U0GnumSEEUUCiTBbSsX6Zy0VI4w/Qy3WV5IoXXkF9YsbkC8JhPq9jHLa5Qt559TF ++347OFso5ae+XkkZ8C112UyKnYzvniqlbj0Cb4E7FadCzSggC9c2drYE12MxQEEb +ddAVNty5wpjh3Qd2y8kKPDSn4OCrSIXAL8WDXJk507RL5moqKnwis/3iPUXiU7s8 +QmJP4B8Mn4vDM1O0rORCmz9KXz0f5M0lw39jdA/AG0fNNz86KCFTPdXz/Iz1Thph +TQOCAQUAAoIBAEvFO/T+HGsdvBJofJEKoixMqKPPSyLA/g4gbhKXkhm+7ctvXT9n +kSAXHuAFR0Ow/z8JJvG8Z4efmIg6g9d9+OJWWN9muczF5jJzdXv5T7Ntaf8+1zv+ +YIA88PoexEBzyABfOyrzxYjteFYtZvSMxvzZruBZZLPuCAV5bF8YCw22I7bkLjoZ +lPlbSMYkG623vsFTIc82gzTLf8F6+bcAMFmz6icpz5aHZ3RJRE8+nTSy9IFutbhz +fwhbGjEyzGp37Uon4eQyaYJWi8kP9vrho3uNff5DljnsWfMrERCiAa4VoXj6JcPE +gIsoMGwlIYEm67lqST6UDjrSOWE4dpSCtLw= +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_ed25519_privkey.pem b/test/fixtures/test_ed25519_privkey.pem new file mode 100644 index 00000000000000..a8b9f2f603f03a --- /dev/null +++ b/test/fixtures/test_ed25519_privkey.pem @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIHXLsXm1lsq5HtyqJwQyFmpfEluuf0KOqP6DqMgGxxDL +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_ed25519_pubkey.pem b/test/fixtures/test_ed25519_pubkey.pem new file mode 100644 index 00000000000000..b9657c9d08d050 --- /dev/null +++ b/test/fixtures/test_ed25519_pubkey.pem @@ -0,0 +1,3 @@ +-----BEGIN PUBLIC KEY----- +MCowBQYDK2VwAyEAEXRYV3v5ucrHVR3mKqyPXxXqU34lASwc7Y7MoOvaqcs= +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_ed448_privkey.pem b/test/fixtures/test_ed448_privkey.pem new file mode 100644 index 00000000000000..b430a7ee7ca56b --- /dev/null +++ b/test/fixtures/test_ed448_privkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PRIVATE KEY----- +MEcCAQAwBQYDK2VxBDsEObxytD95dGN3Hxk7kVk+Lig1rGYTRr3YdaHjRog++Sgk +QD7KwKmxroBURtkE2N0JbQ3ctdrpGRB5DQ== +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_ed448_pubkey.pem b/test/fixtures/test_ed448_pubkey.pem new file mode 100644 index 00000000000000..5619b93aeb0310 --- /dev/null +++ b/test/fixtures/test_ed448_pubkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MEMwBQYDK2VxAzoAIESY3jnpGdB5UVJDCznrv0vmBFIzgSMu+gafsbCX1rFtsJwR +M6XUDQiEY7dk6rmm/Fktyawna5EA +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_key.pem b/test/fixtures/test_key.pem new file mode 100644 index 00000000000000..48fd93c9944ff3 --- /dev/null +++ b/test/fixtures/test_key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDx3wdzpq2rvwm3Ucun1qAD/ClB+wW+RhR1nVix286QvaNqePAd +CAwwLL82NqXcVQRbQ4s95splQnwvjgkFdKVXFTjPKKJI5aV3wSRN61EBVPdYpCre +535yfG/uDysZFCnVQdnCZ1tnXAR8BirxCNjHqbVyIyBGjsNoNCEPb2R35QIDAQAB +AoGBAJNem9C4ftrFNGtQ2DB0Udz7uDuucepkErUy4MbFsc947GfENjDKJXr42Kx0 +kYx09ImS1vUpeKpH3xiuhwqe7tm4FsCBg4TYqQle14oxxm7TNeBwwGC3OB7hiokb +aAjbPZ1hAuNs6ms3Ybvvj6Lmxzx42m8O5DXCG2/f+KMvaNUhAkEA/ekrOsWkNoW9 +2n3m+msdVuxeek4B87EoTOtzCXb1dybIZUVv4J48VAiM43hhZHWZck2boD/hhwjC +M5NWd4oY6QJBAPPcgBVNdNZSZ8hR4ogI4nzwWrQhl9MRbqqtfOn2TK/tjMv10ALg +lPmn3SaPSNRPKD2hoLbFuHFERlcS79pbCZ0CQQChX3PuIna/gDitiJ8oQLOg7xEM +wk9TRiDK4kl2lnhjhe6PDpaQN4E4F0cTuwqLAoLHtrNWIcOAQvzKMrYdu1MhAkBm +Et3qDMnjDAs05lGT72QeN90/mPAcASf5eTTYGahv21cb6IBxM+AnwAPpqAAsHhYR +9h13Y7uYbaOjvuF23LRhAkBoI9eaSMn+l81WXOVUHnzh3ZwB4GuTyxMXXNOhuiFd +0z4LKAMh99Z4xQmqSoEkXsfM4KPpfhYjF/bwIcP5gOei +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/test_rsa_pkcs8_privkey.pem b/test/fixtures/test_rsa_pkcs8_privkey.pem new file mode 100644 index 00000000000000..0d8d1e5cdae916 --- /dev/null +++ b/test/fixtures/test_rsa_pkcs8_privkey.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMIUQ0bDffIaKHL3 +akONlCGXQLfqs8mP4K99ILz6rbyHEDXrVAU1R3XfC4JNRyrRB3aqwF7/aEXJzYMI +kmDSHUvvz7pnhQxHsQ5yl91QT0d/eb+Gz4VRHjm4El4MrUdIUcPxscoPqS/wU8Z8 +lOi1z7bGMnChiL7WGqnV8h6RrGzJAgMBAAECgYEAlHxmQJS/HmTO/6612XtPkyei +t1PVO+hdckZcrtln5S68w1QJ03ZA9ziwGIBBa8vDVxIq3kOwpnxQROlg/Lyk9iec +MTPZ0NiJp7D37ESm5vJ5bagfhnHvXCoG04qSrCtdr+nN2mK5xFGOTq8TphjsQEGz ++Du5qdWkaJs5UASyofUCQQDsOSNUfbxYNSB/Weq9+fYqPoJPuchwTeMYmxlnvOVm +YGYcUM40wtStdH9mbelHmbS0KYGprlEr3m7jXaO3V08jAkEA0lPe/ymeS2HjxtCj +98p6Xq4RjJuhG0Dn+4e4eRnoVAXs5SQaiByZImW451zm3qEjVWwufRBkSNBkwQ5a +v7ApIwJBAILiRckSwcC97vug/oe0b8iISfuSnJRdE28WwMTRzOkkkG8v9pEVQnG5 +Er3WOGMLrywDs2wowaDk5dvkjkmPfrECQQCAhPtoU5gEXAaBABCRY0ou/JKApsBl +FN4sFpykcy5B2XUN92e28DKqkBnSVjREqZYbpoUpqpB85coLJahSJWSdAkBeuWDJ +IVyL/a54qUgTVCoiItJnxXw6WkUtGdvWnMjtTXJBedMAQVgznrTImXNSk5vVXhxJ +wZ3frm2JIy/Es69M +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_rsa_privkey.pem b/test/fixtures/test_rsa_privkey.pem new file mode 100644 index 00000000000000..425518a066b38d --- /dev/null +++ b/test/fixtures/test_rsa_privkey.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF +NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F +UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB +AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA +QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK +kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg +f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u +412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc +mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 +kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA +gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW +G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI +7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/test_rsa_privkey_2.pem b/test/fixtures/test_rsa_privkey_2.pem new file mode 100644 index 00000000000000..092bd85b6bb3b6 --- /dev/null +++ b/test/fixtures/test_rsa_privkey_2.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWQIBAAKBgQCsMgRdxxEeeXscPvqFzp/6/IIdoeKSlBn7361FWZwMQUG0qCbr +XYtdXPyqp2B4GThviIqiaJZITCTY87CiV7bFvH2lmUMJLsCc3BaQ4XFQbEU5D5jN +FfP7g78MEKbCb9rEfYMI2EGwbfKRUZUrYeBadzIMHEMEHDyiBXrCohTXMQIBIwKB +gHEoLsFITRQGr/yeah1qhmMa9ms+fvKb1o+S/NXNLAgNoDTjh0o2KGHspgm+cpgQ +kszzU8nPszbS86SC4cnEnKy/g3uw3Lf55a2P8vgh1P386/PzI+Im8s6E/EpDwn/P +R2E5gqTfePl8m7r9oeIARZXysmHHgBtEm5pTUav6QvOLAkEA2arx2R/3Yb6yZ5oO +3ldZEzCBNmB6mCoczrH6jjBosb4Gj7TK+asNlbinw1gj8sgdkzAw6jGnJ2IUfftm +QMykwQJBAMqFDclCf2b9cwi82+Xg+mjlT8BEf+l5xdRrweOyjB6DmUhgeqDISJUK +JgxGr4TxIQ6DGeEWxChGzzU6utlRnnECQDf4wdi/E7oMdwSylhvqkz9y32XBCZTX +oQHzQG20rTUE+l93oeht0EsSOcSEYQPqUL9yyr/g4dbtVbn+0SabBcsCQEs4u/pL +5i2RVpzYbu77yrk/OuEDf/eiQipT6O4sX+4Tn1VlqePynp3B8N/8/11DnpBclJVu +2yTnGcNQVAeTWBsCQFMekiY/KbwAgTopqpCUg5CLNph91FVW5PIntLmd5gSj8ZJS +uNuro8CURrOe8iiI3pG9m4KkbDdOBSOMADXJojE= +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/test_rsa_privkey_encrypted.pem b/test/fixtures/test_rsa_privkey_encrypted.pem new file mode 100644 index 00000000000000..fce1573d573337 --- /dev/null +++ b/test/fixtures/test_rsa_privkey_encrypted.pem @@ -0,0 +1,17 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIICojAcBgoqhkiG9w0BDAEDMA4ECEMCOq/cAz8QAgIIAASCAoDT/S5XcBm7u/2i +Ar4vLx5L+heu9f4iRRStWO/yaOvxZRmrqNJXI15F74mtfrXga+LKyd8YAYD8XR4e +na6SbOZmBFHBZOWBDmDiupMoq+mOgTe84iOgo8LHYf040PzZnL/ouvepQy5LU1A5 +bv9T1d1BVpQ2IfQ9QNu8rUZFxlD1VzFCB9mvwUgcAfaTSfxyamr7KPlKaIhwPK11 +c1w0xoC+N1mp3KrfK/jwWk3JYFVq35W/7PUsC25qyLWUgJLs9h/eGSzo/5kZ4fLK +bzBox9DzhaoBiKnfPNVKlwP+jL19vVb+0USLh9vTQQ1o4oral1fA+04bJjeOkFTf +VkxVpa7GUZzgjOPIWEeqHDFZ7QZDYKb2e4kWpx9CPWnUlRLcNE88GPx00LnsCkQH +yHBAtA3VCRqE2Yn2ROJmfgjjKQorglxIS6dxc+J9gZb0/M4Ad4Hn7N/23UB3CjYD +qeILsbOOTudQgIOoXOVMgRbhRD3HsU27OSuhvSd+CjpRG9BFuUcBmjZ06TOAZt8q +IZlVwIEaJBeBAYtyfEsaEN76B0DhzvF5fGWSXtlhR3uvftsWQ0J192VvDDJ+DIvX +SON62RfCzKD7FidmUbMVTgCwK2WJ0XiEHSgl7pLeSbAiEd3GAKrdH99FOOqcmqjr +0dLnbCCs3GuXTfoCZGDoNfvoqJ0HdF6zmIOU0mmUn4ia6R/LbbOYDM6DS+rkQRTA +Dqh/ilbp2WU9+OChQIQUOQPLcA7prt/Tnkm3X5TFVVbx7WQRfJhu5l7qElrF8W81 +iiBQrvtiJrBEDst1GmoKBMkOknj+QXK/NzhDFhcHWG5Kg0HQd3I6c1wdg64xBO3U +lyI/PHdl +-----END ENCRYPTED PRIVATE KEY----- diff --git a/test/fixtures/test_rsa_pubkey.pem b/test/fixtures/test_rsa_pubkey.pem new file mode 100644 index 00000000000000..b3bbf6cb90665a --- /dev/null +++ b/test/fixtures/test_rsa_pubkey.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 +6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 +Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw +oYi+1hqp1fIekaxsyQIDAQAB +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_rsa_pubkey_2.pem b/test/fixtures/test_rsa_pubkey_2.pem new file mode 100644 index 00000000000000..eafcf73e192f92 --- /dev/null +++ b/test/fixtures/test_rsa_pubkey_2.pem @@ -0,0 +1,5 @@ +-----BEGIN RSA PUBLIC KEY----- +MIGHAoGBAKwyBF3HER55exw++oXOn/r8gh2h4pKUGfvfrUVZnAxBQbSoJutdi11c +/KqnYHgZOG+IiqJolkhMJNjzsKJXtsW8faWZQwkuwJzcFpDhcVBsRTkPmM0V8/uD +vwwQpsJv2sR9gwjYQbBt8pFRlSth4Fp3MgwcQwQcPKIFesKiFNcxAgEj +-----END RSA PUBLIC KEY----- diff --git a/test/fixtures/test_x25519_privkey.pem b/test/fixtures/test_x25519_privkey.pem new file mode 100644 index 00000000000000..b2f60cca40e547 --- /dev/null +++ b/test/fixtures/test_x25519_privkey.pem @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VuBCIEILD/13Y5R/tmcCjZVSooIcpfGvZxf+qt6dMu5FYaOC1a +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_x25519_pubkey.pem b/test/fixtures/test_x25519_pubkey.pem new file mode 100644 index 00000000000000..3d1e7b835e14ec --- /dev/null +++ b/test/fixtures/test_x25519_pubkey.pem @@ -0,0 +1,3 @@ +-----BEGIN PUBLIC KEY----- +MCowBQYDK2VuAyEAYHCXnz085FKclfnx+gdiGXAyy7BhJjx0pxyE4wbXF0A= +-----END PUBLIC KEY----- diff --git a/test/fixtures/test_x448_privkey.pem b/test/fixtures/test_x448_privkey.pem new file mode 100644 index 00000000000000..39c507d2b8d5d6 --- /dev/null +++ b/test/fixtures/test_x448_privkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PRIVATE KEY----- +MEYCAQAwBQYDK2VvBDoEOPilLIAZTQqUbFb0LhTGaqn47zN2p2yGVk+2hhQQk9C8 +8SvFqEFw73YITSIJ2NUBZnZKNz2nGkrm +-----END PRIVATE KEY----- diff --git a/test/fixtures/test_x448_pubkey.pem b/test/fixtures/test_x448_pubkey.pem new file mode 100644 index 00000000000000..841c2bb66b5bfd --- /dev/null +++ b/test/fixtures/test_x448_pubkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MEIwBQYDK2VvAzkAbceBBM+LkveTK09QojZdnHokCh7lOWxyVZrlbH3Ny3WorprD +Iir5A6heZzlRnz1elOHp7ZpPfWk= +-----END PUBLIC KEY----- diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index c96253bc44d450..80be4dea11e63b 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -41,11 +41,11 @@ const DH_NOT_SUITABLE_GENERATOR = crypto.constants.DH_NOT_SUITABLE_GENERATOR; require('internal/crypto/util').setDefaultEncoding('latin1'); // Test Certificates -const certPem = fixtures.readKey('rsa_cert.crt'); -const certPfx = fixtures.readKey('rsa_cert.pfx'); -const keyPem = fixtures.readKey('rsa_private.pem'); -const rsaPubPem = fixtures.readKey('rsa_public.pem', 'ascii'); -const rsaKeyPem = fixtures.readKey('rsa_private.pem', 'ascii'); +const certPem = fixtures.readSync('test_cert.pem', 'ascii'); +const certPfx = fixtures.readSync('test_cert.pfx'); +const keyPem = fixtures.readSync('test_key.pem', 'ascii'); +const rsaPubPem = fixtures.readSync('test_rsa_pubkey.pem', 'ascii'); +const rsaKeyPem = fixtures.readSync('test_rsa_privkey.pem', 'ascii'); // PFX tests tls.createSecureContext({ pfx: certPfx, passphrase: 'sample' }); @@ -626,11 +626,14 @@ common.expectsError( rsaSign.update(rsaPubPem); const rsaSignature = rsaSign.sign(rsaKeyPem, 'hex'); - const expectedSignature = fixtures.readKey( - 'rsa_public_sha1_signature_signedby_rsa_private.sha1', - 'hex' + assert.strictEqual( + rsaSignature, + '5c50e3145c4e2497aadb0eabc83b342d0b0021ece0d4c4a064b7c' + + '8f020d7e2688b122bfb54c724ac9ee169f83f66d2fe90abeb95e8' + + 'e1290e7e177152a4de3d944cf7d4883114a20ed0f78e70e25ef0f' + + '60f06b858e6af42a2f276ede95bbc6bc9a9bbdda15bd663186a6f' + + '40819a7af19e577bb2efa5e579a1f5ce8a0d4ca8b8f6' ); - assert.strictEqual(rsaSignature, expectedSignature); rsaVerify.update(rsaPubPem); assert.strictEqual(rsaVerify.verify(rsaPubPem, rsaSignature, 'hex'), true); @@ -640,15 +643,17 @@ common.expectsError( // Test RSA signing and verification // { - const privateKey = fixtures.readKey('rsa_private_b.pem'); - const publicKey = fixtures.readKey('rsa_public_b.pem'); + const privateKey = fixtures.readSync('test_rsa_privkey_2.pem'); + const publicKey = fixtures.readSync('test_rsa_pubkey_2.pem'); const input = 'I AM THE WALRUS'; - const signature = fixtures.readKey( - 'I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256', - 'hex' - ); + const signature = + '79d59d34f56d0e94aa6a3e306882b52ed4191f07521f25f505a078dc2f89' + + '396e0c8ac89e996fde5717f4cb89199d8fec249961fcb07b74cd3d2a4ffa' + + '235417b69618e4bcd76b97e29975b7ce862299410e1b522a328e44ac9bb2' + + '8195e0268da7eda23d9825ac43c724e86ceeee0d0d4465678652ccaf6501' + + '0ddfb299bedeb1ad'; const sign = crypto.createSign('SHA256'); sign.update(input); @@ -667,8 +672,8 @@ common.expectsError( // Test DSA signing and verification // { - const privateKey = fixtures.readKey('dsa_private.pem'); - const publicKey = fixtures.readKey('dsa_public.pem'); + const privateKey = fixtures.readSync('test_dsa_privkey.pem'); + const publicKey = fixtures.readSync('test_dsa_pubkey.pem'); const input = 'I AM THE WALRUS'; diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index e987be212958a7..a426e0be003da0 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -30,10 +30,9 @@ const { Certificate } = crypto; const fixtures = require('../common/fixtures'); // Test Certificates -const spkacValid = fixtures.readKey('rsa_spkac.spkac'); -const spkacChallenge = 'this-is-a-challenge'; -const spkacFail = fixtures.readKey('rsa_spkac_invalid.spkac'); -const spkacPublicPem = fixtures.readKey('rsa_public.pem'); +const spkacValid = fixtures.readSync('spkac.valid'); +const spkacFail = fixtures.readSync('spkac.fail'); +const spkacPem = fixtures.readSync('spkac.pem'); function checkMethods(certificate) { @@ -42,13 +41,13 @@ function checkMethods(certificate) { assert.strictEqual( stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')), - stripLineEndings(spkacPublicPem.toString('utf8')) + stripLineEndings(spkacPem.toString('utf8')) ); assert.strictEqual(certificate.exportPublicKey(spkacFail), ''); assert.strictEqual( certificate.exportChallenge(spkacValid).toString('utf8'), - spkacChallenge + 'fb9ab814-6677-42a4-a60c-f905d1a6924d' ); assert.strictEqual(certificate.exportChallenge(spkacFail), ''); } diff --git a/test/parallel/test-crypto-key-objects.js b/test/parallel/test-crypto-key-objects.js index 558f7dc1f4b673..2a3a3ec2f0bff1 100644 --- a/test/parallel/test-crypto-key-objects.js +++ b/test/parallel/test-crypto-key-objects.js @@ -21,8 +21,8 @@ const { const fixtures = require('../common/fixtures'); -const publicPem = fixtures.readKey('rsa_public.pem', 'ascii'); -const privatePem = fixtures.readKey('rsa_private.pem', 'ascii'); +const publicPem = fixtures.readSync('test_rsa_pubkey.pem', 'ascii'); +const privatePem = fixtures.readSync('test_rsa_privkey.pem', 'ascii'); const publicDsa = fixtures.readKey('dsa_public_1025.pem', 'ascii'); const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', @@ -203,18 +203,18 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', } [ - { private: fixtures.readKey('ed25519_private.pem', 'ascii'), - public: fixtures.readKey('ed25519_public.pem', 'ascii'), + { private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'), + public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'), keyType: 'ed25519' }, - { private: fixtures.readKey('ed448_private.pem', 'ascii'), - public: fixtures.readKey('ed448_public.pem', 'ascii'), + { private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'), + public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'), keyType: 'ed448' }, - { private: fixtures.readKey('x25519_private.pem', 'ascii'), - public: fixtures.readKey('x25519_public.pem', 'ascii'), + { private: fixtures.readSync('test_x25519_privkey.pem', 'ascii'), + public: fixtures.readSync('test_x25519_pubkey.pem', 'ascii'), keyType: 'x25519' }, - { private: fixtures.readKey('x448_private.pem', 'ascii'), - public: fixtures.readKey('x448_public.pem', 'ascii'), - keyType: 'x448' }, + { private: fixtures.readSync('test_x448_privkey.pem', 'ascii'), + public: fixtures.readSync('test_x448_pubkey.pem', 'ascii'), + keyType: 'x448' } ].forEach((info) => { const keyType = info.keyType; diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js index 120a9f1f94f570..35839834087905 100644 --- a/test/parallel/test-crypto-rsa-dsa.js +++ b/test/parallel/test-crypto-rsa-dsa.js @@ -11,19 +11,18 @@ const constants = crypto.constants; const fixtures = require('../common/fixtures'); // Test certificates -const certPem = fixtures.readKey('rsa_cert.crt'); -const keyPem = fixtures.readKey('rsa_private.pem'); -const rsaKeySize = 2048; -const rsaPubPem = fixtures.readKey('rsa_public.pem', 'ascii'); -const rsaKeyPem = fixtures.readKey('rsa_private.pem', 'ascii'); -const rsaKeyPemEncrypted = fixtures.readKey('rsa_private_encrypted.pem', - 'ascii'); -const dsaPubPem = fixtures.readKey('dsa_public.pem', 'ascii'); -const dsaKeyPem = fixtures.readKey('dsa_private.pem', 'ascii'); -const dsaKeyPemEncrypted = fixtures.readKey('dsa_private_encrypted.pem', - 'ascii'); -const rsaPkcs8KeyPem = fixtures.readKey('rsa_private_pkcs8.pem'); -const dsaPkcs8KeyPem = fixtures.readKey('dsa_private_pkcs8.pem'); +const certPem = fixtures.readSync('test_cert.pem', 'ascii'); +const keyPem = fixtures.readSync('test_key.pem', 'ascii'); +const rsaPubPem = fixtures.readSync('test_rsa_pubkey.pem', 'ascii'); +const rsaKeyPem = fixtures.readSync('test_rsa_privkey.pem', 'ascii'); +const rsaKeyPemEncrypted = fixtures.readSync('test_rsa_privkey_encrypted.pem', + 'ascii'); +const dsaPubPem = fixtures.readSync('test_dsa_pubkey.pem', 'ascii'); +const dsaKeyPem = fixtures.readSync('test_dsa_privkey.pem', 'ascii'); +const dsaKeyPemEncrypted = fixtures.readSync('test_dsa_privkey_encrypted.pem', + 'ascii'); +const rsaPkcs8KeyPem = fixtures.readSync('test_rsa_pkcs8_privkey.pem'); +const dsaPkcs8KeyPem = fixtures.readSync('test_dsa_pkcs8_privkey.pem'); const decryptError = { message: 'error:06065064:digital envelope routines:EVP_DecryptFinal_ex:' + @@ -97,7 +96,7 @@ const decryptError = { assert.strictEqual(decryptedBufferWithPassword.toString(), input); // Now with RSA_NO_PADDING. Plaintext needs to match key size. - const plaintext = 'x'.repeat(rsaKeySize / 8); + const plaintext = 'x'.repeat(128); encryptedBuffer = crypto.privateEncrypt({ padding: crypto.constants.RSA_NO_PADDING, key: rsaKeyPemEncrypted, @@ -154,7 +153,7 @@ const decryptError = { } function test_rsa(padding) { - const size = (padding === 'RSA_NO_PADDING') ? rsaKeySize / 8 : 32; + const size = (padding === 'RSA_NO_PADDING') ? 1024 / 8 : 32; const input = Buffer.allocUnsafe(size); for (let i = 0; i < input.length; i++) input[i] = (i * 7 + 11) & 0xff; @@ -190,10 +189,12 @@ let rsaVerify = crypto.createVerify('SHA1'); assert.ok(rsaSign); assert.ok(rsaVerify); -const expectedSignature = fixtures.readKey( - 'rsa_public_sha1_signature_signedby_rsa_private_pkcs8.sha1', - 'hex' -); +const expectedSignature = + '5c50e3145c4e2497aadb0eabc83b342d0b0021ece0d4c4a064b7c' + + '8f020d7e2688b122bfb54c724ac9ee169f83f66d2fe90abeb95e8' + + 'e1290e7e177152a4de3d944cf7d4883114a20ed0f78e70e25ef0f' + + '60f06b858e6af42a2f276ede95bbc6bc9a9bbdda15bd663186a6f' + + '40819a7af19e577bb2efa5e579a1f5ce8a0d4ca8b8f6'; rsaSign.update(rsaPubPem); let rsaSignature = rsaSign.sign(rsaKeyPem, 'hex'); @@ -234,21 +235,23 @@ assert.throws(() => { // Test RSA signing and verification // { - const privateKey = fixtures.readKey('rsa_private_b.pem'); - const publicKey = fixtures.readKey('rsa_public_b.pem'); + const privateKey = fixtures.readSync('test_rsa_privkey_2.pem'); + const publicKey = fixtures.readSync('test_rsa_pubkey_2.pem'); const input = 'I AM THE WALRUS'; - const signature = fixtures.readKey( - 'I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256', - 'hex' - ); + const signature = + '79d59d34f56d0e94aa6a3e306882b52ed4191f07521f25f505a078dc2f89' + + '396e0c8ac89e996fde5717f4cb89199d8fec249961fcb07b74cd3d2a4ffa' + + '235417b69618e4bcd76b97e29975b7ce862299410e1b522a328e44ac9bb2' + + '8195e0268da7eda23d9825ac43c724e86ceeee0d0d4465678652ccaf6501' + + '0ddfb299bedeb1ad'; const sign = crypto.createSign('SHA256'); sign.update(input); const output = sign.sign(privateKey, 'hex'); - assert.strictEqual(output, signature); + assert.strictEqual(signature, output); const verify = crypto.createVerify('SHA256'); verify.update(input); @@ -260,7 +263,7 @@ assert.throws(() => { sign2.update(input); const output2 = sign2.sign(privateKey, 'hex'); - assert.strictEqual(output2, signature); + assert.strictEqual(signature, output2); const verify2 = crypto.createVerify('SHA256'); verify2.update(input); diff --git a/test/parallel/test-crypto-sign-verify.js b/test/parallel/test-crypto-sign-verify.js index 66c7ac7d8014df..062c2d08377cfe 100644 --- a/test/parallel/test-crypto-sign-verify.js +++ b/test/parallel/test-crypto-sign-verify.js @@ -11,9 +11,9 @@ const crypto = require('crypto'); const fixtures = require('../common/fixtures'); // Test certificates -const certPem = fixtures.readKey('rsa_cert.crt'); -const keyPem = fixtures.readKey('rsa_private.pem'); -const keySize = 2048; +const certPem = fixtures.readSync('test_cert.pem', 'ascii'); +const keyPem = fixtures.readSync('test_key.pem', 'ascii'); +const modSize = 1024; { const Sign = crypto.Sign; @@ -152,7 +152,7 @@ common.expectsError( { function testPSS(algo, hLen) { // Maximum permissible salt length - const max = keySize / 8 - hLen - 2; + const max = modSize / 8 - hLen - 2; function getEffectiveSaltLength(saltLength) { switch (saltLength) { @@ -418,12 +418,12 @@ common.expectsError( } [ - { private: fixtures.readKey('ed25519_private.pem', 'ascii'), - public: fixtures.readKey('ed25519_public.pem', 'ascii'), + { private: fixtures.readSync('test_ed25519_privkey.pem', 'ascii'), + public: fixtures.readSync('test_ed25519_pubkey.pem', 'ascii'), algo: null, sigLen: 64 }, - { private: fixtures.readKey('ed448_private.pem', 'ascii'), - public: fixtures.readKey('ed448_public.pem', 'ascii'), + { private: fixtures.readSync('test_ed448_privkey.pem', 'ascii'), + public: fixtures.readSync('test_ed448_pubkey.pem', 'ascii'), algo: null, sigLen: 114 }, { private: fixtures.readKey('rsa_private_2048.pem', 'ascii'), diff --git a/test/parallel/test-crypto-verify-failure.js b/test/parallel/test-crypto-verify-failure.js index ad7d5d4f86d52b..7e9fda9f6791f6 100644 --- a/test/parallel/test-crypto-verify-failure.js +++ b/test/parallel/test-crypto-verify-failure.js @@ -29,7 +29,7 @@ const crypto = require('crypto'); const tls = require('tls'); const fixtures = require('../common/fixtures'); -const certPem = fixtures.readKey('rsa_cert.crt'); +const certPem = fixtures.readSync('test_cert.pem', 'ascii'); const options = { key: fixtures.readKey('agent1-key.pem'), diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index 9337621d37fcfb..1952f8908acb03 100644 --- a/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js @@ -37,7 +37,7 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); // Test Certificates -const certPfx = fixtures.readKey('rsa_cert.pfx'); +const certPfx = fixtures.readSync('test_cert.pfx'); // 'this' safety // https://github.com/joyent/node/issues/6690 @@ -224,12 +224,17 @@ assert.throws(function() { }); assert.throws(function() { - // The correct header inside `rsa_private_pkcs8_bad.pem` should have been + // The correct header inside `test_bad_rsa_privkey.pem` should have been // -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- // instead of // -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- - const sha1_privateKey = fixtures.readKey('rsa_private_pkcs8_bad.pem', - 'ascii'); + // It is generated in this way: + // $ openssl genrsa -out mykey.pem 512; + // $ openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem \ + // -out private_key.pem -nocrypt; + // Then open private_key.pem and change its header and footer. + const sha1_privateKey = fixtures.readSync('test_bad_rsa_privkey.pem', + 'ascii'); // This would inject errors onto OpenSSL's error stack crypto.createSign('sha1').sign(sha1_privateKey); }, (err) => { diff --git a/test/parallel/test-https-client-reject.js b/test/parallel/test-https-client-reject.js index 113b56fda66fe4..729256df54ff8c 100644 --- a/test/parallel/test-https-client-reject.js +++ b/test/parallel/test-https-client-reject.js @@ -30,8 +30,8 @@ const assert = require('assert'); const https = require('https'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = https.createServer(options, common.mustCall(function(req, res) { @@ -72,7 +72,7 @@ function rejectUnauthorized() { function authorized() { const options = { port: server.address().port, - ca: [fixtures.readKey('rsa_cert.crt')] + ca: [fixtures.readSync('test_cert.pem')] }; options.agent = new https.Agent(options); const req = https.request(options, function(res) { diff --git a/test/parallel/test-https-client-renegotiation-limit.js b/test/parallel/test-https-client-renegotiation-limit.js index 6b5aad2d30933f..4d3dda3d759e38 100644 --- a/test/parallel/test-https-client-renegotiation-limit.js +++ b/test/parallel/test-https-client-renegotiation-limit.js @@ -50,8 +50,8 @@ const LIMITS = [0, 1, 2, 3, 5, 10, 16]; function test(next) { const options = { - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem'), }; const server = https.createServer(options, (req, res) => { diff --git a/test/parallel/test-https-drain.js b/test/parallel/test-https-drain.js index 1c8a29258f26f6..98e43b27d4cebd 100644 --- a/test/parallel/test-https-drain.js +++ b/test/parallel/test-https-drain.js @@ -29,8 +29,8 @@ const assert = require('assert'); const https = require('https'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const bufSize = 1024 * 1024; diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index 43057817043789..4e1a8fbc4c6b30 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -33,15 +33,21 @@ const https = require('https'); const spawn = require('child_process').spawn; const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), + key: fixtures.readSync('agent.key'), + cert: fixtures.readSync('agent.crt'), requestCert: true, rejectUnauthorized: false }; -const webIdUrl = 'URI:http://example.com/#me'; -const modulus = fixtures.readKey('rsa_cert_foafssl_b.modulus', 'ascii').replace(/\n/g, ''); -const exponent = fixtures.readKey('rsa_cert_foafssl_b.exponent', 'ascii').replace(/\n/g, ''); +const modulus = 'A6F44A9C25791431214F5C87AF9E040177A8BB89AC803F7E09BBC3A5519F' + + '349CD9B9C40BE436D0AA823A94147E26C89248ADA2BE3DD4D34E8C289646' + + '94B2047D217B4F1299371EA93A83C89AB9440724131E65F2B0161DE9560C' + + 'DE9C13455552B2F49CF0FB00D8D77532324913F6F80FF29D0A131D29DB06' + + 'AFF8BE191B7920DC2DAE1C26EA82A47847A10391EF3BF6AABB3CC40FF821' + + '00B03A4F0FF1809278E4DDFDA7DE954ED56DC7AD9A47EEBC37D771A366FC' + + '60A5BCB72373BEC180649B3EFA0E9092707210B41B90032BB18BC91F2046' + + 'EBDAF1191F4A4E26D71879C4C7867B62FCD508E8CE66E82D128A71E91580' + + '9FCF44E8DE774067F1DE5D70B9C03687'; const CRLF = '\r\n'; const body = 'hello world\n'; @@ -52,8 +58,8 @@ const server = https.createServer(options, common.mustCall(function(req, res) { cert = req.connection.getPeerCertificate(); - assert.strictEqual(cert.subjectaltname, webIdUrl); - assert.strictEqual(cert.exponent, exponent); + assert.strictEqual(cert.subjectaltname, 'URI:http://example.com/#me'); + assert.strictEqual(cert.exponent, '0x10001'); assert.strictEqual(cert.modulus, modulus); res.writeHead(200, { 'content-type': 'text/plain' }); res.end(body); @@ -63,8 +69,8 @@ server.listen(0, function() { const args = ['s_client', '-quiet', '-connect', `127.0.0.1:${this.address().port}`, - '-cert', fixtures.path('keys/rsa_cert_foafssl_b.crt'), - '-key', fixtures.path('keys/rsa_private_b.pem')]; + '-cert', fixtures.path('foafssl.crt'), + '-key', fixtures.path('foafssl.key')]; const client = spawn(common.opensslCli, args); diff --git a/test/parallel/test-https-pfx.js b/test/parallel/test-https-pfx.js index 4246913a037ec1..7cf23a7dfa17f4 100644 --- a/test/parallel/test-https-pfx.js +++ b/test/parallel/test-https-pfx.js @@ -30,7 +30,7 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const https = require('https'); -const pfx = fixtures.readKey('rsa_cert.pfx'); +const pfx = fixtures.readSync('test_cert.pfx'); const options = { host: '127.0.0.1', diff --git a/test/parallel/test-https-unix-socket-self-signed.js b/test/parallel/test-https-unix-socket-self-signed.js index 9db92ac2aed44a..48207a7a22f52a 100644 --- a/test/parallel/test-https-unix-socket-self-signed.js +++ b/test/parallel/test-https-unix-socket-self-signed.js @@ -10,8 +10,8 @@ tmpdir.refresh(); const fixtures = require('../common/fixtures'); const https = require('https'); const options = { - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }; const server = https.createServer(options, common.mustCall((req, res) => { diff --git a/test/parallel/test-tls-async-cb-after-socket-end.js b/test/parallel/test-tls-async-cb-after-socket-end.js index 357cef30715d71..49ca0cebc9b524 100644 --- a/test/parallel/test-tls-async-cb-after-socket-end.js +++ b/test/parallel/test-tls-async-cb-after-socket-end.js @@ -15,8 +15,8 @@ const tls = require('tls'); const options = { secureOptions: SSL_OP_NO_TICKET, - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = tls.createServer(options, common.mustCall()); diff --git a/test/parallel/test-tls-client-abort.js b/test/parallel/test-tls-client-abort.js index 50c9a4b32437fc..09f252db308881 100644 --- a/test/parallel/test-tls-client-abort.js +++ b/test/parallel/test-tls-client-abort.js @@ -27,8 +27,8 @@ if (!common.hasCrypto) const tls = require('tls'); const fixtures = require('../common/fixtures'); -const cert = fixtures.readKey('rsa_cert.crt'); -const key = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readSync('test_cert.pem'); +const key = fixtures.readSync('test_key.pem'); const conn = tls.connect({ cert, key, port: 0 }, common.mustNotCall()); conn.on('error', function() {}); diff --git a/test/parallel/test-tls-client-reject.js b/test/parallel/test-tls-client-reject.js index d41ad806ea3012..329b78c271baaa 100644 --- a/test/parallel/test-tls-client-reject.js +++ b/test/parallel/test-tls-client-reject.js @@ -29,8 +29,8 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = tls.createServer(options, function(socket) { @@ -80,7 +80,7 @@ function rejectUnauthorized() { function authorized() { console.log('connect authorized'); const socket = tls.connect(server.address().port, { - ca: [fixtures.readKey('rsa_cert.crt')], + ca: [fixtures.readSync('test_cert.pem')], servername: 'localhost' }, common.mustCall(function() { console.log('... authorized'); diff --git a/test/parallel/test-tls-client-renegotiation-limit.js b/test/parallel/test-tls-client-renegotiation-limit.js index 9a08efe96f5098..38dcf5a80be5a6 100644 --- a/test/parallel/test-tls-client-renegotiation-limit.js +++ b/test/parallel/test-tls-client-renegotiation-limit.js @@ -49,8 +49,8 @@ const LIMITS = [0, 1, 2, 3, 5, 10, 16]; function test(next) { const options = { - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem'), }; const server = tls.createServer(options, (conn) => { diff --git a/test/parallel/test-tls-connect-given-socket.js b/test/parallel/test-tls-connect-given-socket.js index f25cf4582d59b1..5fc5603dd1653b 100644 --- a/test/parallel/test-tls-connect-given-socket.js +++ b/test/parallel/test-tls-connect-given-socket.js @@ -30,8 +30,8 @@ const tls = require('tls'); const net = require('net'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const server = tls.createServer(options, common.mustCall((socket) => { diff --git a/test/parallel/test-tls-connect-memleak.js b/test/parallel/test-tls-connect-memleak.js index b0dedfa0bba56d..162d61fcdc7a66 100644 --- a/test/parallel/test-tls-connect-memleak.js +++ b/test/parallel/test-tls-connect-memleak.js @@ -35,8 +35,8 @@ const fixtures = require('../common/fixtures'); // added using `once()`, i.e. can be gc'ed once that event has occurred. const server = tls.createServer({ - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }).listen(0); let collected = false; diff --git a/test/parallel/test-tls-connect-no-host.js b/test/parallel/test-tls-connect-no-host.js index 97b95332c47c2e..f6384743ac7081 100644 --- a/test/parallel/test-tls-connect-no-host.js +++ b/test/parallel/test-tls-connect-no-host.js @@ -8,8 +8,8 @@ if (!common.hasCrypto) const tls = require('tls'); const assert = require('assert'); -const cert = fixtures.readKey('rsa_cert.crt'); -const key = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readSync('test_cert.pem'); +const key = fixtures.readSync('test_key.pem'); // https://github.com/nodejs/node/issues/1489 // tls.connect(options) with no options.host should accept a cert with diff --git a/test/parallel/test-tls-connect-stream-writes.js b/test/parallel/test-tls-connect-stream-writes.js index 001fe985800f28..0c6ae2b660d502 100644 --- a/test/parallel/test-tls-connect-stream-writes.js +++ b/test/parallel/test-tls-connect-stream-writes.js @@ -9,9 +9,9 @@ const stream = require('stream'); const net = require('net'); const fixtures = require('../common/fixtures'); -const options = { key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: [ fixtures.readKey('rsa_ca.crt') ], +const options = { key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem'), + ca: [ fixtures.readSync('test_ca.pem') ], ciphers: 'AES256-GCM-SHA384' }; const content = 'hello world'; const recv_bufs = []; diff --git a/test/parallel/test-tls-destroy-stream.js b/test/parallel/test-tls-destroy-stream.js index a49e985a7e0204..b06d7728dc6764 100644 --- a/test/parallel/test-tls-destroy-stream.js +++ b/test/parallel/test-tls-destroy-stream.js @@ -18,9 +18,9 @@ tls.DEFAULT_MAX_VERSION = 'TLSv1.3'; const CONTENT = 'Hello World'; const tlsServer = tls.createServer( { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: [fixtures.readKey('rsa_ca.crt')], + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem'), + ca: [fixtures.readSync('test_ca.pem')], }, (socket) => { socket.on('close', common.mustCall()); diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js index ef645ce1b6c624..868686335077a5 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js @@ -44,8 +44,10 @@ common.expectWarning('SecurityWarning', 'DH parameter is less than 2048 bits'); function loadDHParam(n) { - const keyname = `dh${n}.pem`; - return fixtures.readKey(keyname); + const params = [`dh${n}.pem`]; + if (n !== 'error') + params.unshift('keys'); + return fixtures.readSync(params); } function test(keylen, expectedCipher, cb) { diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index af40cc33baeda0..398beb0d097701 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -28,9 +28,9 @@ const fixtures = require('../common/fixtures'); const assert = require('assert'); const tls = require('tls'); -const options = { key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: [ fixtures.readKey('rsa_ca.crt') ] }; +const options = { key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem'), + ca: [ fixtures.readSync('test_ca.pem') ] }; const server = tls.createServer(options, onconnection); let gotChunk = false; diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js index ec3642cbf74614..20018241e33572 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -18,8 +18,8 @@ const clientConfigs = [ const serverConfig = { secureProtocol: 'TLS_method', - key: fixtures.readKey('agent2-key.pem'), - cert: fixtures.readKey('agent2-cert.pem') + key: fixtures.readSync('/keys/agent2-key.pem'), + cert: fixtures.readSync('/keys/agent2-cert.pem') }; const server = tls.createServer(serverConfig, common.mustCall(function() { diff --git a/test/parallel/test-tls-handshake-exception.js b/test/parallel/test-tls-handshake-exception.js index 4d8ea7d33ae7fb..1ba4bc6438e2f9 100644 --- a/test/parallel/test-tls-handshake-exception.js +++ b/test/parallel/test-tls-handshake-exception.js @@ -21,8 +21,8 @@ if (process.argv[2] === 'child') { const { Duplex } = require('stream'); const { mustCall } = common; - const cert = fixtures.readKey('rsa_cert.crt'); - const key = fixtures.readKey('rsa_private.pem'); + const cert = fixtures.readSync('test_cert.pem'); + const key = fixtures.readSync('test_key.pem'); net.createServer(mustCall(onplaintext)).listen(0, mustCall(onlisten)); diff --git a/test/parallel/test-tls-hello-parser-failure.js b/test/parallel/test-tls-hello-parser-failure.js index 07776dd89e9227..4b92f6bde3151c 100644 --- a/test/parallel/test-tls-hello-parser-failure.js +++ b/test/parallel/test-tls-hello-parser-failure.js @@ -36,8 +36,8 @@ const tls = require('tls'); const net = require('net'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const bonkers = Buffer.alloc(1024 * 1024, 42); diff --git a/test/parallel/test-tls-inception.js b/test/parallel/test-tls-inception.js index 7310308e6f9876..f28f92373c5500 100644 --- a/test/parallel/test-tls-inception.js +++ b/test/parallel/test-tls-inception.js @@ -32,8 +32,8 @@ const tls = require('tls'); const net = require('net'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const body = 'A'.repeat(40000); diff --git a/test/parallel/test-tls-interleave.js b/test/parallel/test-tls-interleave.js index 91449b5b3ae571..70f98f33e4f2b2 100644 --- a/test/parallel/test-tls-interleave.js +++ b/test/parallel/test-tls-interleave.js @@ -30,9 +30,9 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); -const options = { key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt'), - ca: [ fixtures.readKey('rsa_ca.crt') ] }; +const options = { key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem'), + ca: [ fixtures.readSync('test_ca.pem') ] }; const writes = [ 'some server data', diff --git a/test/parallel/test-tls-keylog-tlsv13.js b/test/parallel/test-tls-keylog-tlsv13.js index 0f6556451d013e..e56d777ff038b0 100644 --- a/test/parallel/test-tls-keylog-tlsv13.js +++ b/test/parallel/test-tls-keylog-tlsv13.js @@ -9,8 +9,8 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); const server = tls.createServer({ - key: fixtures.readKey('agent2-key.pem'), - cert: fixtures.readKey('agent2-cert.pem'), + key: fixtures.readSync('/keys/agent2-key.pem'), + cert: fixtures.readSync('/keys/agent2-cert.pem'), // Amount of keylog events depends on negotiated protocol // version, so force a specific one: minVersion: 'TLSv1.3', diff --git a/test/parallel/test-tls-net-connect-prefer-path.js b/test/parallel/test-tls-net-connect-prefer-path.js index 1b8231664dce38..263501ae0330ac 100644 --- a/test/parallel/test-tls-net-connect-prefer-path.js +++ b/test/parallel/test-tls-net-connect-prefer-path.js @@ -29,8 +29,8 @@ function mkServer(lib, tcp, cb) { const args = [handler]; if (lib === tls) { args.unshift({ - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }); } const server = lib.createServer(...args); diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js index 1acb1f93767404..4cbb62e3d595f1 100644 --- a/test/parallel/test-tls-no-sslv3.js +++ b/test/parallel/test-tls-no-sslv3.js @@ -11,8 +11,8 @@ const tls = require('tls'); const spawn = require('child_process').spawn; const fixtures = require('../common/fixtures'); -const cert = fixtures.readKey('rsa_cert.crt'); -const key = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readSync('test_cert.pem'); +const key = fixtures.readSync('test_key.pem'); const server = tls.createServer({ cert, key }, common.mustNotCall()); const errors = []; let stderr = ''; diff --git a/test/parallel/test-tls-passphrase.js b/test/parallel/test-tls-passphrase.js index e6b57b243f684b..6ed19c74d22f73 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.readKey('rsa_private_encrypted.pem'); -const rawKey = fixtures.readKey('rsa_private.pem'); -const cert = fixtures.readKey('rsa_cert.crt'); +const passKey = fixtures.readSync('pass-key.pem'); +const rawKey = fixtures.readSync('raw-key.pem'); +const cert = fixtures.readSync('pass-cert.pem'); 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: 'password', + passphrase: 'passphrase', 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: 'password', + passphrase: 'passphrase', 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: 'password', + passphrase: 'passphrase', 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: 'password', + passphrase: 'passphrase', 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: 'password', + passphrase: 'passphrase', 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: 'password' }], + key: [{ pem: passKey, passphrase: 'passphrase' }], cert: cert, rejectUnauthorized: false }, common.mustCall()); tls.connect({ port: this.address().port, - key: [{ pem: passKey, passphrase: 'password' }], + key: [{ pem: passKey, passphrase: 'passphrase' }], 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: 'password', + passphrase: 'passphrase', cert: cert, rejectUnauthorized: false }, common.mustCall()); tls.connect({ port: this.address().port, - key: [{ pem: passKey.toString(), passphrase: 'password' }], + key: [{ pem: passKey.toString(), passphrase: 'passphrase' }], 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: 'password', // Valid but unused + passphrase: 'passphrase', // Valid but unused cert: cert, rejectUnauthorized: false }); diff --git a/test/parallel/test-tls-pause.js b/test/parallel/test-tls-pause.js index 120d6d87a7a913..e246acff807a91 100644 --- a/test/parallel/test-tls-pause.js +++ b/test/parallel/test-tls-pause.js @@ -32,8 +32,8 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const bufSize = 1024 * 1024; diff --git a/test/parallel/test-tls-peer-certificate-multi-keys.js b/test/parallel/test-tls-peer-certificate-multi-keys.js index ce4a0d406f9ea1..a2548d6bcffb9e 100644 --- a/test/parallel/test-tls-peer-certificate-multi-keys.js +++ b/test/parallel/test-tls-peer-certificate-multi-keys.js @@ -29,8 +29,8 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('agent.key'), + cert: fixtures.readSync('multi-alice.crt') }; const server = tls.createServer(options, function(cleartext) { @@ -42,7 +42,7 @@ server.once('secureConnection', common.mustCall(function(socket) { // The server's local cert is the client's peer cert. assert.deepStrictEqual( cert.subject.OU, - ['Test TLS Certificate', 'Engineering'] + ['Information Technology', 'Engineering', 'Marketing'] ); })); @@ -54,7 +54,7 @@ server.listen(0, common.mustCall(function() { const peerCert = socket.getPeerCertificate(); assert.deepStrictEqual( peerCert.subject.OU, - ['Test TLS Certificate', 'Engineering'] + ['Information Technology', 'Engineering', 'Marketing'] ); server.close(); })); diff --git a/test/parallel/test-tls-securepair-fiftharg.js b/test/parallel/test-tls-securepair-fiftharg.js index 9adb2bf424818b..0651f98c6d780d 100644 --- a/test/parallel/test-tls-securepair-fiftharg.js +++ b/test/parallel/test-tls-securepair-fiftharg.js @@ -9,8 +9,8 @@ const tls = require('tls'); const fixtures = require('../common/fixtures'); const sslcontext = tls.createSecureContext({ - cert: fixtures.readKey('rsa_cert.crt'), - key: fixtures.readKey('rsa_private.pem') + cert: fixtures.readSync('test_cert.pem'), + key: fixtures.readSync('test_key.pem') }); const pair = tls.createSecurePair(sslcontext, true, false, false, { diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js index 5e3cd4130cba9f..92234fb4108fc5 100644 --- a/test/parallel/test-tls-securepair-server.js +++ b/test/parallel/test-tls-securepair-server.js @@ -33,8 +33,8 @@ const net = require('net'); const spawn = require('child_process').spawn; const fixtures = require('../common/fixtures'); -const key = fixtures.readKey('rsa_private.pem'); -const cert = fixtures.readKey('rsa_cert.crt'); +const key = fixtures.readSync('agent.key').toString(); +const cert = fixtures.readSync('agent.crt').toString(); function log(a) { console.error(`***server*** ${a}`); diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js index 34c4a71ab2c149..2a74be0521df21 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js @@ -41,8 +41,8 @@ doTest({ tickets: false }, function() { }); function doTest(testOptions, callback) { - const key = fixtures.readKey('rsa_private.pem'); - const cert = fixtures.readKey('rsa_cert.crt'); + const key = fixtures.readSync('agent.key'); + const cert = fixtures.readSync('agent.crt'); const options = { key, cert, @@ -101,8 +101,8 @@ function doTest(testOptions, callback) { '-tls1', '-connect', `localhost:${this.address().port}`, '-servername', 'ohgod', - '-key', fixtures.path('keys/rsa_private.pem'), - '-cert', fixtures.path('keys/rsa_cert.crt'), + '-key', fixtures.path('agent.key'), + '-cert', fixtures.path('agent.crt'), '-reconnect' ].concat(testOptions.tickets ? [] : '-no_ticket'); diff --git a/test/parallel/test-tls-ticket-cluster.js b/test/parallel/test-tls-ticket-cluster.js index cc4f46e1430aea..234c1bad09c9a7 100644 --- a/test/parallel/test-tls-ticket-cluster.js +++ b/test/parallel/test-tls-ticket-cluster.js @@ -94,8 +94,8 @@ if (cluster.isMaster) { return; } -const key = fixtures.readKey('rsa_private.pem'); -const cert = fixtures.readKey('rsa_cert.crt'); +const key = fixtures.readSync('agent.key'); +const cert = fixtures.readSync('agent.crt'); const options = { key, cert }; diff --git a/test/parallel/test-tls-zero-clear-in.js b/test/parallel/test-tls-zero-clear-in.js index f24fb6f992e75d..b2a07960d4138c 100644 --- a/test/parallel/test-tls-zero-clear-in.js +++ b/test/parallel/test-tls-zero-clear-in.js @@ -28,8 +28,8 @@ if (!common.hasCrypto) const tls = require('tls'); const fixtures = require('../common/fixtures'); -const cert = fixtures.readKey('rsa_cert.crt'); -const key = fixtures.readKey('rsa_private.pem'); +const cert = fixtures.readSync('test_cert.pem'); +const key = fixtures.readSync('test_key.pem'); const server = tls.createServer({ cert, diff --git a/test/parallel/test-vm-syntax-error-stderr.js b/test/parallel/test-vm-syntax-error-stderr.js index e8d48235cf3ede..137d5de432b398 100644 --- a/test/parallel/test-vm-syntax-error-stderr.js +++ b/test/parallel/test-vm-syntax-error-stderr.js @@ -4,7 +4,7 @@ const assert = require('assert'); const child_process = require('child_process'); const fixtures = require('../common/fixtures'); -const wrong_script = fixtures.path('keys/rsa_cert.crt'); +const wrong_script = fixtures.path('cert.pem'); const p = child_process.spawn(process.execPath, [ '-e', diff --git a/test/pummel/test-https-no-reader.js b/test/pummel/test-https-no-reader.js index 31d2bfa2d3ca34..ad0b56c1f3c7b1 100644 --- a/test/pummel/test-https-no-reader.js +++ b/test/pummel/test-https-no-reader.js @@ -29,8 +29,8 @@ const https = require('https'); const fixtures = require('../common/fixtures'); const options = { - key: fixtures.readKey('rsa_private.pem'), - cert: fixtures.readKey('rsa_cert.crt') + key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem') }; const buf = Buffer.allocUnsafe(1024 * 1024); diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index 13aee51175f618..9f5c073c9e2d06 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -266,9 +266,9 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check const { TCP, constants: TCPConstants } = internalBinding('tcp_wrap'); const tcp = new TCP(TCPConstants.SOCKET); - const ca = fixtures.readKey('rsa_ca.crt'); - const cert = fixtures.readKey('rsa_cert.crt'); - const key = fixtures.readKey('rsa_private.pem'); + const ca = fixtures.readSync('test_ca.pem', 'ascii'); + const cert = fixtures.readSync('test_cert.pem', 'ascii'); + const key = fixtures.readSync('test_key.pem', 'ascii'); const credentials = require('tls').createSecureContext({ ca, cert, key }); diff --git a/test/sequential/test-tls-connect.js b/test/sequential/test-tls-connect.js index 5cfec7ed04707d..291747aea77b49 100644 --- a/test/sequential/test-tls-connect.js +++ b/test/sequential/test-tls-connect.js @@ -33,8 +33,8 @@ const tls = require('tls'); // https://github.com/joyent/node/issues/1218 // uncatchable exception on TLS connection error { - const cert = fixtures.readKey('rsa_cert.crt'); - const key = fixtures.readKey('rsa_private.pem'); + const cert = fixtures.readSync('test_cert.pem'); + const key = fixtures.readSync('test_key.pem'); const options = { cert: cert, key: key, port: common.PORT }; const conn = tls.connect(options, common.mustNotCall()); @@ -47,8 +47,8 @@ const tls = require('tls'); // SSL_accept/SSL_connect error handling { - const cert = fixtures.readKey('rsa_cert.crt'); - const key = fixtures.readKey('rsa_private.pem'); + const cert = fixtures.readSync('test_cert.pem'); + const key = fixtures.readSync('test_key.pem'); assert.throws(() => { tls.connect({ diff --git a/test/sequential/test-tls-securepair-client.js b/test/sequential/test-tls-securepair-client.js index c450410baf907c..eec65af8a101ed 100644 --- a/test/sequential/test-tls-securepair-client.js +++ b/test/sequential/test-tls-securepair-client.js @@ -42,7 +42,7 @@ test1(); // simple/test-tls-securepair-client function test1() { - test('keys/rsa_private.pem', 'keys/rsa_cert.crt', null, test2); + test('agent.key', 'agent.crt', null, test2); } // simple/test-tls-ext-key-usage diff --git a/test/sequential/test-tls-session-timeout.js b/test/sequential/test-tls-session-timeout.js index 86a29eed46fe73..4e430b7135df30 100644 --- a/test/sequential/test-tls-session-timeout.js +++ b/test/sequential/test-tls-session-timeout.js @@ -51,8 +51,8 @@ function doTest() { const SESSION_TIMEOUT = 1; - const key = fixtures.readKey('rsa_private.pem'); - const cert = fixtures.readKey('rsa_cert.crt'); + const key = fixtures.readSync('agent.key'); + const cert = fixtures.readSync('agent.crt'); const options = { key: key, cert: cert,