From 4a04be32fbc81b718858bd15d578c0f08e1ff36b Mon Sep 17 00:00:00 2001 From: Mike Reinstein Date: Fri, 18 Sep 2020 16:38:30 -0700 Subject: [PATCH] updaet node-forge to fix critical vulnerability. fix unit tests --- package.json | 2 +- test/cert-latest.pem | 64 ----------------------- test/echo-api-cert-8.pem | 110 +++++++++++++++++++++++++++++++++++++++ test/index.js | 2 +- test/validate-cert.js | 2 +- 5 files changed, 113 insertions(+), 67 deletions(-) delete mode 100644 test/cert-latest.pem create mode 100644 test/echo-api-cert-8.pem diff --git a/package.json b/package.json index 6a1a0e9..fb73c09 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "author": "Mike Reinstein", "license": "MIT", "dependencies": { - "node-forge": "^0.7.0", + "node-forge": "^0.10.0", "validator": "^9.0.0" }, "devDependencies": { diff --git a/test/cert-latest.pem b/test/cert-latest.pem deleted file mode 100644 index c3ee98c..0000000 --- a/test/cert-latest.pem +++ /dev/null @@ -1,64 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIF5jCCBM6gAwIBAgIQQPlwU5w/zc7VB5NZu84xNzANBgkqhkiG9w0BAQsFADB+ -MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd -BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj -IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE3MTAwMzAwMDAwMFoX -DTE4MDcwMzIzNTk1OVowbTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0 -b24xEDAOBgNVBAcMB1NlYXR0bGUxGTAXBgNVBAoMEEFtYXpvbi5jb20sIEluYy4x -HDAaBgNVBAMME2VjaG8tYXBpLmFtYXpvbi5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQCQ9PvhGTQogVCnaeqkuUDiEnK4Tbm6hLEg7jrHGfpN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GX0InLNmfiIEfXzf+YzguaoxX7+0AjiJVgIcWjmzaLmFN5OUiQt/eV5E1PnXi8t -TRttQBVSK/eHiXgSgW7ZTaoteNTCLD0IX4eRnh8OsN4wUmSGiaqdZpwOdgyA8nTY -Kvi4Os7X1g8RvmurFPW9QaAiY4nxug9vKWNmLT+sjHLF+8fk1A/yO0+MKcc= ------END CERTIFICATE----- diff --git a/test/echo-api-cert-8.pem b/test/echo-api-cert-8.pem new file mode 100644 index 0000000..fd290ad --- /dev/null +++ b/test/echo-api-cert-8.pem @@ -0,0 +1,110 @@ +-----BEGIN CERTIFICATE----- +MIIFbjCCBFagAwIBAgIQBRsSsK9/f9dI7rlZGtPo3TANBgkqhkiG9w0BAQsFADBG +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg +Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMDAzMTkwMDAwMDBaFw0yMTAzMTAx +MjAwMDBaMB4xHDAaBgNVBAMTE2VjaG8tYXBpLmFtYXpvbi5jb20wggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCmd8SQClJ92SBjL2Q3G1MxQ4QEnTVE7qA3 +QhsAphIe1FHkSt4IVODhugprFNecdYppWSGy0Bzl7kn0KGer4NE6TJ3KV/Ux4jzw +M1aXhq3JmQcOA7DFO+EqdjhcwSoVmZJF32M7X0M2AdR3HZB9s/dk8MDpEPewtT4/ +2V0CsbEsA9sgKnzVZUdbL3SETLPJyh/+8N84fm32mjkrQdFPVqGWK9fp1tYwE+3M +5X6ZiiCXJsnyewnxOFm1upiNbX/6hJtMJch9kpIfQzz8eKHt9jtLpsM5m04pV/t8 +SmQlQ+rnnH/JrDN5HJ86D6nAW3o8UcILwGTDnsre18OJ3AbFxkBXAgMBAAGjggJ+ +MIICejAfBgNVHSMEGDAWgBRZpGYGUqB7lZI8o5QHJ5Z0W/k90DAdBgNVHQ4EFgQU +C+rUYvMdvL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zXEMIOqYjnME8GCCsGAQUFBwEBBEMwQTAcBggrBgEFBQcwAYYQaHR0cDovL28u +c3MyLnVzLzAhBggrBgEFBQcwAoYVaHR0cDovL3guc3MyLnVzL3guY2VyMCYGA1Ud +HwQfMB0wG6AZoBeGFWh0dHA6Ly9zLnNzMi51cy9yLmNybDARBgNVHSAECjAIMAYG +BFUdIAAwDQYJKoZIhvcNAQELBQADggEBACMd44pXyn3pF3lM8R5V/cxTbj5HD9/G +VfKyBDbtgB9TxF00KGu+x1X8Z+rLP3+QsjPNG1gQggL4+C/1E2DUBc7xgQjB3ad1 +l08YuW3e95ORCLp+QCztweq7dp4zBncdDQh/U90bZKuCJ/Fp1U1ervShw3WnWEQt +8jxwmKy6abaVd38PMV4s/KCHOkdp8Hlf9BRUpJVeEXgSYCfOn8J3/yNTd126/+pZ +59vPr5KW7ySaNRB6nJHGDn2Z9j8Z3/VyVOEVqQdZe4O/Ui5GjLIAZHYcSNPYeehu +VsyuLAOQ1xk4meTKCRlb/weWsKh/NEnfVqn3sF/tM+2MR7cwA130A4w= +-----END CERTIFICATE----- diff --git a/test/index.js b/test/index.js index 7fe50c5..7d1821a 100644 --- a/test/index.js +++ b/test/index.js @@ -6,7 +6,7 @@ var verifier = require('../') var sinon = require('sinon') -var cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-5.pem' // latest valid cert +var cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-8.pem' // latest valid cert test('handle missing cert_url parameter', function (t) { var body, now, signature diff --git a/test/validate-cert.js b/test/validate-cert.js index 1f9fd85..c9b98e2 100644 --- a/test/validate-cert.js +++ b/test/validate-cert.js @@ -103,7 +103,7 @@ test('fails on expired certificate (Not After)', function (t) { }) test('approves valid certifcate', function (t) { - var pem = fs.readFileSync(__dirname + '/cert-latest.pem') + var pem = fs.readFileSync(__dirname + '/echo-api-cert-8.pem') t.assert(validate(pem) === undefined, 'Certificate should be valid') t.end() })