From 6f6ac58d997b95560f9485588691159f7c55abf2 Mon Sep 17 00:00:00 2001 From: e6c31d <90863725+e6c31d@users.noreply.github.com> Date: Sun, 11 Dec 2022 09:46:04 +0300 Subject: [PATCH 1/2] Fix build in Node.js 18 by re-encrypting test key The encrypted private key test/certs/agent2-key-with-password.pem was encrypted with DES, which is unsupported in Node.js 18. I re-encrypted it with AES, and now the build works in Node.js 18. --- test/certs/agent2-key-with-password.pem | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/test/certs/agent2-key-with-password.pem b/test/certs/agent2-key-with-password.pem index 7d47b552a..573a3e5dd 100644 --- a/test/certs/agent2-key-with-password.pem +++ b/test/certs/agent2-key-with-password.pem @@ -1,11 +1,12 @@ -----BEGIN ENCRYPTED PRIVATE KEY----- -MIIBgTAbBgkqhkiG9w0BBQMwDgQICq+TjRaVRpYCAggABIIBYIW7b0BY6bWa1tcl -kW9xqSNyMI6C051rPqMzbN8jTrKneHSaegCCDd6fDDyH3vXJaxxzmgnGuRBHEv/6 -8tTTbQERI1VnjYAH3dgYIdi3k1YYCKHatPK7El1B3ffWhiW8t1jNOWRC6p00VbIN -SYKrTs8s1JGoMkeKp6N1jATbnPcuqPut3MdQjV/7cHMJJC2t8dDfiKspRB2x/bDY -6S665JLXUpAhTvSVehtBIoXA9BBGVanbhgT4vyx9T4PJKmsiylrz4cTDeoeXPkE/ -eWx0IDJr7uyllCkzY4nftEKRZdjUZa4dzvLlZpbW1bppPi0j8yjvt0YE5qEf+LNZ -8QvE3We5eOE76tYBfA44yUwUJJ8coTg4/mOomaZnW+LRdH9jxQdDIYesZkR4dosO -f3lqR5GTZGpr/qaI//Pf1r6nRCDw9Oqi+knPJUNqAJh13Y7jvFedIdAL6vJXFZxq -PsZxAOE= +MIIBvTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIeCPjj50AYmgCAggA +MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBCEkXowWEmMgYbOpWWJSoaKBIIB +YKP5Gj6LiydCZmU+leC8obpeaJMKllmtwh48TZzDvA52bBFqPIsahmRRfwDiTOSp +akc8VqxBIb4jYa71fIjKeserYZn+1hxbj3Cr6HcSPQZmCfQCFCDY52JF/44iaZqx +Yioh0XEacW+RZeLFf05sYZu/isoTKpANlbEc3fLds+CwM9lGCOgwOdkzO5CdvnoN +F3sq24CsZOKUT1fhfqAGhkv2zPyzC3lOQ8j8IsI8m1T/qC5/m4cJhu8roDvxTxRS +PhsONSuBUznYOeXnuY+9cTjaKDYLiFsbCCzncgp7xF22hNl5unMvDPk7ZARIPMC5 +0TQDiqbr4FRUPA4TbziRZixuzsMupkUoQe5mS0EmHfNbjOMIllj8BQFIXLIugX3h +eGua84R2u/Yh4SO/S8NkjNEH24Unvl+dn9u7rSaEC1acG41aKR3RYJYW4P02QCmN +QzVvyBz4irCA+6h3fNVXd6Q= -----END ENCRYPTED PRIVATE KEY----- From b93ea3780bbc942843b07f5105c206538b3bf728 Mon Sep 17 00:00:00 2001 From: e6c31d <90863725+e6c31d@users.noreply.github.com> Date: Sun, 18 Dec 2022 22:01:42 +0300 Subject: [PATCH 2/2] Try IPv4, IPv4-mapped IPv6, and IPv6 in test --- test/server-test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/server-test.js b/test/server-test.js index 180c1ac30..6d82430cd 100644 --- a/test/server-test.js +++ b/test/server-test.js @@ -340,9 +340,14 @@ describe('SOAP Server', function () { soap.createClient(test.baseUrl + '/stockquote?wsdl', function (err, client) { assert.ifError(err); client.IsValidPrice({ price: 50000 }, function (err, result) { - // node V3.x+ reports addresses as IPV6 - var addressParts = lastReqAddress.split(':'); - assert.equal(addressParts[(addressParts.length - 1)], '127.0.0.1'); + // One of these should match, depending on the network configuration + // of the host + var localhostAddresses = [ + '127.0.0.1', + '::ffff:127.0.0.1', + '::1' + ]; + assert.notEqual(localhostAddresses.indexOf(lastReqAddress), -1); done(); }); });