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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ydtRQkdxVK2dZNzLBvBlLlRmtoClU7xm3A+/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----- +MIID8DCCAtigAwIBAgIJALmw0zKhqlY1MA0GCSqGSIb3DQEBBQUA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/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 +VBV4shKUj3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un0Q2Qa2Mg1kTjk +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 59eb6c7c8831cc..00000000000000 Binary files a/test/fixtures/keys/I_AM_THE_WALRUS_sha256_signature_signedby_rsa_private_b.sha256 and /dev/null differ 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/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ko -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 -BQAwgbAxCzAJBgNVBAYTAlVLMRQ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jj5oo8lY5CGyOacQV8 -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 627f27bc7fe14d..00000000000000 Binary files a/test/fixtures/keys/rsa_cert.pfx and /dev/null differ diff --git a/test/fixtures/keys/rsa_cert_foafssl_b.cnf b/test/fixtures/keys/rsa_cert_foafssl_b.cnf deleted file mode 100644 index 5e69db885a5ab7..00000000000000 --- a/test/fixtures/keys/rsa_cert_foafssl_b.cnf +++ /dev/null @@ -1,28 +0,0 @@ -# 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 - -[ req ] -days = 99999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -x509_extensions = v3_ca - -[ req_distinguished_name ] -C = UK -ST = "FOAF+SSL Auth Certificate" -L = Rhys Jones -O = node.js -OU = Test TLS Certificate -CN = localhost -emailAddress = alex@aub.dev - -[ req_attributes ] - -[ v3_ca ] -basicConstraints = CA:FALSE -subjectAltName = @alt_names - -[ alt_names ] -URI = http://example.com/\#me diff --git a/test/fixtures/keys/rsa_cert_foafssl_b.crt b/test/fixtures/keys/rsa_cert_foafssl_b.crt deleted file mode 100644 index fa4db56c1f2b92..00000000000000 --- a/test/fixtures/keys/rsa_cert_foafssl_b.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEEDCCAvigAwIBAgIUAhzZrkGH3j4aXirSjA6n87moF9kwDQYJKoZIhvcNAQEL -B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iARVSZOgd0nN/L6U6JlPbjtK92CpIx+gDw67 -lYV3QQCGU0tNQ1EFNzj6A7Mi/zSZ5wBbTi886xYztLPSjWEHt+8pShHga/Qi3alN -3haN/UvyamKgmWna8s3zWrCEZwW7D+XQqWoA2EISlnIdX46agHgmU30+TalGDAzf -OFwGvEfkyHTrrl6TxwdLU8fWsEcBOF6Ukg7kEc1aCBgd3cD9LI8g2N8DQdkWGGEQ -innpMWv59H2v3gVMj/0/BPGthQMTHMrhKWZZ1QGjkId7tHro ------END CERTIFICATE----- diff --git a/test/fixtures/keys/rsa_cert_foafssl_b.exponent b/test/fixtures/keys/rsa_cert_foafssl_b.exponent deleted file mode 100644 index ac0ecd69753412..00000000000000 --- a/test/fixtures/keys/rsa_cert_foafssl_b.exponent +++ /dev/null @@ -1 +0,0 @@ -0x10001 diff --git a/test/fixtures/keys/rsa_cert_foafssl_b.modulus b/test/fixtures/keys/rsa_cert_foafssl_b.modulus deleted file mode 100644 index 7f7f1f02cf0285..00000000000000 --- a/test/fixtures/keys/rsa_cert_foafssl_b.modulus +++ /dev/null @@ -1 +0,0 @@ -C9BD60AEB37EDBD7F179E11B4DA4848DAE932834E94FF5979EAAC5092FA1EC861C9C3A0057072C3D4E4565E50FBCB28CCE2F4D1D2277E0B402BABA87807F17F9CC34613DE07584BFEEAA10897B3ECCABFAD7935CB6D0F7C6540B71E63E370CE7A0F5F2C99C0E799AB25391E2A9BAEABBA85DAFA81062880C34B9F6371056DA919E81DEBE6463025F7FBF06D30FFFAB579ADB588D8FB284DD92AC6CF970A856A5C1E20BA5FE07BB822A8299CBEB768D4C5854A5305ABD59B8CF24A529EE54272FD4EA0C1848A610703BBFF79A17FCBECFF55D43863CF068539D537829BB6067EA3D3E8863C4B154EB655E4C02E2C54E663D029281220229F8DEBF415452EAC5EB diff --git a/test/fixtures/keys/rsa_private.pem b/test/fixtures/keys/rsa_private.pem deleted file mode 100644 index 215e5cc5131251..00000000000000 --- a/test/fixtures/keys/rsa_private.pem +++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v4im2iI8V63JQS4ZMYQbckq8ABYccTpOnxXDy0rAoGBAKkvzHa+QjERhjB9GyoT -1FhLQIsVBmYSWrp1+cGO9V6HPxoeHJzvm+wTSf/uS/FmaINL6+j4Ii4a6gWgmJts -I6cqBtqNsAx5vjQJczf8KdxthBYa0sXTrsfktXNJKUXMqIgDtp9vazQ2vozs8AQX -FPAAhD3SzgkJdCBBRSTt97ZfAoGAWAziKpxLKL7LnL4dzDcx8JIPIuwnTxh0plCD -dCffyLaT8WJ9lXbXHFTjOvt8WfPrlDP/Ylxmfkw5BbGZOP1VLGjZn2DkH9aMiwNm -bDXFPdG0G3hzQovx/9fajiRV4DWghLHeT9wzJfZabRRiI0VQR472300AVEeX4vgb -rDBn600CgYEAk7czBCT9rHn/PNwCa17hlTy88C4vXkwbz83Oa+aX5L4e5gw5lhcR -2ZuZHLb2r6oMt9rlD7EIDItSs+u21LOXWPTAlazdnpYUyw/CzogM/PN+qNwMRXn5 -uXFFhmlP2mVg2EdELTahXch8kWqHaCSX53yvqCtRKu/j76V31TfQZGM= ------END RSA PRIVATE KEY----- diff --git a/test/fixtures/keys/rsa_private_b.pem b/test/fixtures/keys/rsa_private_b.pem deleted file mode 100644 index 96d82ae2e24a3c..00000000000000 --- a/test/fixtures/keys/rsa_private_b.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAyb1grrN+29fxeeEbTaSEja6TKDTpT/WXnqrFCS+h7IYcnDoA -VwcsPU5FZeUPvLKMzi9NHSJ34LQCurqHgH8X+cw0YT3gdYS/7qoQiXs+zKv615Nc -ttD3xlQLceY+NwznoPXyyZwOeZqyU5Hiqbrqu6hdr6gQYogMNLn2NxBW2pGegd6+ -ZGMCX3+/BtMP/6tXmttYjY+yhN2SrGz5cKhWpcHiC6X+B7uCKoKZy+t2jUxYVKUw -Wr1ZuM8kpSnuVCcv1OoMGEimEHA7v/eaF/y+z/VdQ4Y88GhTnVN4KbtgZ+o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2hq81ZAtBOfWO0myjWECYuByxqHzV3zo6tLz -6q0wxsECgYA26twPrAoRqvfvPnNj6o0LrsE39Tj6jHIVijT7Lbcf2xVnaDiQ18PQ -RC6Tgkz5KZf8GKfMRMA3WopGn9QE2luI4RLIbhLozEDrkk2L7wSYqI9DZ1Hd26wf -v3+3jdpsXkzHwWYz1a2+FhCF5mJJRQl6kd/B0wu00vdfwviK9OVO7w== ------END RSA PRIVATE KEY----- diff --git a/test/fixtures/keys/rsa_private_encrypted.pem b/test/fixtures/keys/rsa_private_encrypted.pem deleted file mode 100644 index f1914289ec4f7f..00000000000000 --- a/test/fixtures/keys/rsa_private_encrypted.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,DB3D20E60E8FDC3356BD79712FF8EF7E - -K+vu0U3IFTJBBi6zW5Zng80O1jXq/ZmlOFs/j/SQpPwfW1Do9i/Dwa7ntBlTwrCm -sd3IIPgu2ikfLwxvbxsZN540oCaCqaZ/bmmyzH3MyVDA9MllUu+X8+Q3ATzcYa9R -U5XfF5DAXsSRnstCbmKagWVQpO0oX8k3ratfny6Ixq86Y82tK8+o5YiBFq1kqa+9 -4yat7IWQbqV5ifUtUPCHZwEqBt+WKazX05BqERjkckHdpfaDrBvSSPXTwoLm6uRR -ktkUVpO4tHMZ4VlcTfFtpz8gdYYod0nM6vz26hvbESHSwztSgMhmKdsE5eqmYfgu -F4WkEN4bqAiPjKK3jnUKPt/vg2oKYFQlVYFl9QnBjiRqcQTi3e9lwn1hI7uoMb6g -HuaCc57JJHPN/ZLP3ts4ZxFbwUjTGioh5Zh6WozG3L3+Ujwq/sDrAskRyzdcuP7I -Rs3oLbHY03OHyg8IbxR5Iu89l6FLqnR45yvbxXtZ7ImGOPM5Z9pB1CzDhGDx2F6g -J/Kf/7ZF2DmYUVbVKDfESEDhRfuMAVzhasDPTRqipSA5QvJVQY+J/6QDPrNNmHVB -4e4ouHIDWERUf0t1Be7THvP3X8OJozj2HApzqa5ZCaJDo8eaL8TCD5uH75ID5URJ -VscGHaUXT8/sxfHi1x8BibW5W5J/akFsnrnJU/1BZgGznIxjf5tKfHGppSIVdlKP -3ghYNmEIFPNJ6cxuUA0D2IOV4uO3FTCU6seIzvJhYkmXnticcZYGtmGxXKrodtzS -J1YuaNkkO/YRZah285lQ6QCIhCFo4Oa4ILjgoTQISuw7nQj5ESyncauzLUBXKX0c -XDUej64KNTvVF9UXdG48fYvNmSZWCnTye4UmPu17FmwpVra38U+EdoLyWyMIAI5t -rP6Hhgc9BxOo41Im9QpTcAPfKAknP8Rbm3ACJG5T9FKq/c29d1E//eFR6SL51e/a -yWdCgJN/FJOAX60+erPwoVoRFEttAeDPkklgFGdc8F4LIYAig9gEZ92ykFFz3fWz -jIcUVLrL+IokFbPVUBoMihqVyMQsWH+5Qq9wjxf6EDIf0BVtm9U4BJoOkPStFIfF -Kof7OVv7izyL8R/GIil9VQs9ftwkIUPeXx2Hw0bE3HJ3C8K4+mbLg3tKhGnBDU5Z -Xm5mLHoCRBa3ZRFWZtigX7POszdLAzftYo8o65Be4OtPS+tQAORk9gHsXATv7dDB -OGw61x5KA55LHVHhWaRvu3J8E7nhxw0q/HskyZhDC+Y+Xs6vmQSb4nO4ET4NYX1P -m3PMdgGoqRDJ2jZw4eoQdRKCM0EHSepSAYpO1tcAXhPZS4ITogoRgPpVgOebEQUL -nKNeNu/BxMSH/IH15jjDLF3TiEoguF9xdTaCxIBzE1SFpVO0u9m9vXpWdPThVgsb -VcEI487p7v9iImP3BYPT8ZYvytC26EH0hyOrwhahTvTb4vXghkLIyvPUg1lZHc6e -aPHb2AzYAHLnp/ehDQGKWrCOJ1JE2vBv8ZkLa+XZo7YASXBRZitPOMlvykEyzxmR -QAmNhKGvFmeM2mmHAp0aC03rgF3lxNsXQ1CyfEdq3UV9ReSnttq8gtrJfCwxV+wY ------END RSA PRIVATE KEY----- diff --git a/test/fixtures/keys/rsa_private_pkcs8.pem b/test/fixtures/keys/rsa_private_pkcs8.pem deleted file mode 100644 index cd274ae6d9071d..00000000000000 --- a/test/fixtures/keys/rsa_private_pkcs8.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC33FiIiiexwLe/ -P8DZx5HsqFlmUO7/lvJ7necJVNwqdZ3ax5jpQB0p6uxfqeOvzcN3k5V7UFb/Am+n -kSNZMAZhsWzCU2Z4Pjh50QYz3f0Hour7/yIGStOLyYY3hgLK2K8TbhgjQPhdkw9+ -QtKlpvbL8fLgONAoGrVOFnRQGcr70iFffsm79mgZhKVMgYiHPJqJgGHvCtkGg9zM -gS7p63+Q3ZWedtFS2RhMX3uCBy/mH6EOlRCNBbRmA4xxNzyf5GQaki3T+Iz9tOMj -dPP+CwV2LqEdylmBuik8vrfTb3qIHLKKBAI8lXN26wWtA3kN4L7NP+cbKlCRlqct -vhmylLH1AgMBAAECggEBAJLZ6ti7yDKgY+LcT/NiBDqKyEUBlbMNZIW5vAPnBKbh -JIDO9WIv9Fs7qSpLbnFHnr0OYtGIfMPXtUiYkyw0QJSc+upHZMvbno4llpes0eHc -jWVTBWETON4oywvj/Kz53vRc9eiKhxVuVWyagNcQgYSprjzLA+9UTcWeB67Guyrf -8YJUE2LC23RiMA5nGYoSHfVRl0c75gj7A0X9nwpAI+xw3kcaVHRIhA6WowA3Pj1o -pK2t692+NLVRylpvMMSS4rziDexomFykCFukYWYB/kZOOSSETSsTWoMXXl1KqsoZ -8IW06NR4rXtIgQ3sTfbYKGZNF5nWFgZ+hJVx0We1Qg0CgYEA8UovlB4nrBm7xH+u -7XXBMbqxADQm5vaEZxw9eluc+tP7cIAI4sglMIvL/FMpbd2pEeP/BkR76NTDzzDu -PAZvUGRavgEjy0O9j2NAs/WPK4tZF+vFdunhnSh4EHAF4Ij9kbsUi90NOpbGfVqP -dOaHqzgHKoR23Cuusk9wFQ2XTV8CgYEAwxHdEYT9xrpfrHPqSBQPpO0dWGKJEkrW -Ob+76rSfuL8wGR4OBNmQdhLuU9zTIh22pog+XPnLPAecC+4yu/wtJ2SPCKiKDbJB -re0CKPyRfGqzvA3njXwMxXazU4kGs+2Fg+xu/iKbaIjxXrclBLhkxhBtySrwAFhx -xOk6fFcPLSsCgYEAqS/Mdr5CMRGGMH0bKhPUWEtAixUGZhJaunX5wY71Xoc/Gh4c -nO+b7BNJ/+5L8WZog0vr6PgiLhrqBaCYm2wjpyoG2o2wDHm+NAlzN/wp3G2EFhrS -xdOux+S1c0kpRcyoiAO2n29rNDa+jOzwBBcU8ACEPdLOCQl0IEFFJO33tl8CgYBY -DOIqnEsovsucvh3MNzHwkg8i7CdPGHSmUIN0J9/ItpPxYn2VdtccVOM6+3xZ8+uU -M/9iXGZ+TDkFsZk4/VUsaNmfYOQf1oyLA2ZsNcU90bQbeHNCi/H/19qOJFXgNaCE -sd5P3DMl9lptFGIjRVBHjvbfTQBUR5fi+BusMGfrTQKBgQCTtzMEJP2sef883AJr -XuGVPLzwLi9eTBvPzc5r5pfkvh7mDDmWFxHZm5kctvavqgy32uUPsQgMi1Kz67bU -s5dY9MCVrN2elhTLD8LOiAz8836o3AxFefm5cUWGaU/aZWDYR0QtNqFdyHyRaodo -JJfnfK+oK1Eq7+PvpXfVN9BkYw== ------END PRIVATE KEY----- diff --git a/test/fixtures/keys/rsa_private_pkcs8_bad.pem b/test/fixtures/keys/rsa_private_pkcs8_bad.pem deleted file mode 100644 index ca36972e3a6503..00000000000000 --- a/test/fixtures/keys/rsa_private_pkcs8_bad.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC33FiIiiexwLe/ -P8DZx5HsqFlmUO7/lvJ7necJVNwqdZ3ax5jpQB0p6uxfqeOvzcN3k5V7UFb/Am+n -kSNZMAZhsWzCU2Z4Pj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Hm+NAlzN/wp3G2EFhrS -xdOux+S1c0kpRcyoiAO2n29rNDa+jOzwBBcU8ACEPdLOCQl0IEFFJO33tl8CgYBY -DOIqnEsovsucvh3MNzHwkg8i7CdPGHSmUIN0J9/ItpPxYn2VdtccVOM6+3xZ8+uU -M/9iXGZ+TDkFsZk4/VUsaNmfYOQf1oyLA2ZsNcU90bQbeHNCi/H/19qOJFXgNaCE -sd5P3DMl9lptFGIjRVBHjvbfTQBUR5fi+BusMGfrTQKBgQCTtzMEJP2sef883AJr -XuGVPLzwLi9eTBvPzc5r5pfkvh7mDDmWFxHZm5kctvavqgy32uUPsQgMi1Kz67bU -s5dY9MCVrN2elhTLD8LOiAz8836o3AxFefm5cUWGaU/aZWDYR0QtNqFdyHyRaodo -JJfnfK+oK1Eq7+PvpXfVN9BkYw== ------END RSA PRIVATE KEY----- diff --git a/test/fixtures/keys/rsa_public.pem b/test/fixtures/keys/rsa_public.pem deleted file mode 100644 index 8c30cfa52d47af..00000000000000 --- a/test/fixtures/keys/rsa_public.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt9xYiIonscC3vz/A2ceR -7KhZZlDu/5bye53nCVTcKnWd2seY6UAdKersX6njr83Dd5OVe1BW/wJvp5EjWTAG -YbFswlNmeD44edEGM939B6Lq+/8iBkrTi8mGN4YCytivE24YI0D4XZMPfkLSpab2 -y/Hy4DjQKBq1ThZ0UBnK+9IhX37Ju/ZoGYSlTIGIhzyaiYBh7wrZBoPczIEu6et/ -kN2VnnbRUtkYTF97ggcv5h+hDpUQjQW0ZgOMcTc8n+RkGpIt0/iM/bTjI3Tz/gsF -di6hHcpZgbopPL630296iByyigQCPJVzdusFrQN5DeC+zT/nGypQkZanLb4ZspSx -9QIDAQAB ------END PUBLIC KEY----- diff --git a/test/fixtures/keys/rsa_public_b.pem b/test/fixtures/keys/rsa_public_b.pem deleted file mode 100644 index bce0804617fcb6..00000000000000 --- a/test/fixtures/keys/rsa_public_b.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyb1grrN+29fxeeEbTaSE -ja6TKDTpT/WXnqrFCS+h7IYcnDoAVwcsPU5FZeUPvLKMzi9NHSJ34LQCurqHgH8X -+cw0YT3gdYS/7qoQiXs+zKv615NcttD3xlQLceY+NwznoPXyyZwOeZqyU5Hiqbrq -u6hdr6gQYogMNLn2NxBW2pGegd6+ZGMCX3+/BtMP/6tXmttYjY+yhN2SrGz5cKhW -pcHiC6X+B7uCKoKZy+t2jUxYVKUwWr1ZuM8kpSnuVCcv1OoMGEimEHA7v/eaF/y+ -z/VdQ4Y88GhTnVN4KbtgZ+o9PohjxLFU62VeTALixU5mPQKSgSICKfjev0FUUurF -6wIDAQAB ------END PUBLIC KEY----- diff --git a/test/fixtures/keys/rsa_public_sha1_signature_signedby_rsa_private.sha1 b/test/fixtures/keys/rsa_public_sha1_signature_signedby_rsa_private.sha1 deleted file mode 100644 index 0b5947929a6895..00000000000000 --- a/test/fixtures/keys/rsa_public_sha1_signature_signedby_rsa_private.sha1 +++ /dev/null @@ -1,2 +0,0 @@ -�yf�F���4}�x=�e Z'`a%�Z>Yt�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�a { 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,