From 896622b9ff26671e32de826369e059343e8571e8 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 26 Sep 2022 08:24:03 -0700 Subject: [PATCH] update deps and latest amazon cert --- package.json | 6 +- ...o-api-cert-10.cer => echo-api-cert-11.cer} | 58 +++++++++---------- test/index.js | 2 +- test/validate-cert.js | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) rename test/{echo-api-cert-10.cer => echo-api-cert-11.cer} (73%) diff --git a/package.json b/package.json index 5781e46..0f77d61 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,9 @@ "validator": "^13.7.0" }, "devDependencies": { - "nock": "^9.0.2", - "sinon": "^4.1.5", - "tap": "^15.0.9", + "nock": "^13.0.0", + "sinon": "^14.0.0", + "tap": "^16.0.0", "unroll": "1.4.0" }, "engines": { diff --git a/test/echo-api-cert-10.cer b/test/echo-api-cert-11.cer similarity index 73% rename from test/echo-api-cert-10.cer rename to test/echo-api-cert-11.cer index 8af665d..713dc11 100644 --- a/test/echo-api-cert-10.cer +++ b/test/echo-api-cert-11.cer @@ -1,36 +1,36 @@ -----BEGIN CERTIFICATE----- -MIIF3jCCBMagAwIBAgIQASsRtcjaANz51ZqQaypmYDANBgkqhkiG9w0BAQsFADBG +MIIF3TCCBMWgAwIBAgIQBcM1jabruTKfD4gLTlR22zANBgkqhkiG9w0BAQsFADBG MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg -Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMTA4MzEwMDAwMDBaFw0yMjA4MDQy +Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMjA2MTYwMDAwMDBaFw0yMzA2MTUy MzU5NTlaMB4xHDAaBgNVBAMTE2VjaG8tYXBpLmFtYXpvbi5jb20wggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDCsCGMfuSvxF6EZZkqZYsFyaAUl3bh7Zbr -MCSY/5GAN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ueyxEt +H/QL97uYBjl4pHj2xCE9u34so92SMw+Cls0cegLPKZZAY+BaErRc0eaGCedt5Ipy +jlzsQy0HLceNfwcU4KKCVX6v3qrIbiwYsn1zaPHF6BdlfYD/RATyHHAY6MKShG91 +vocf6dJJQvAXEhlJn1C9FpxyOIRQNwfWmqIhFspzyWjylg7KqTtgtf7JpFdAEwM8 +iF8DGeo7FvqDHkx6PtkOgso= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIESTCCAzGgAwIBAgITBn+UV4WH6Kx33rJTMlu8mYtWDTANBgkqhkiG9w0BAQsF diff --git a/test/index.js b/test/index.js index ea33a4a..aecf4b6 100644 --- a/test/index.js +++ b/test/index.js @@ -4,7 +4,7 @@ import verifier from '../index.js' import sinon from 'sinon' -const cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-10.pem' // latest valid cert +const cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-11.pem' // latest valid cert test('handle missing cert_url parameter', function (t) { const signature = 'JbWZ4iO5ogpq1NhsOqyqq/QRrvc1/XyDwjcBO9wWSk//c11+gImmtWzMG9tDEW40t0Xwt1cnGU93DwUZQzMyzJ5CMi+09qVQUSIHiSmPekKaQRxS0Ibu7l7cXXuCcOBupbkheD/Dsd897Bm5SQwd1cFKRv+PJlpmGKimgh2QmbivogsEkFl8b9SW48kjKWazwj/XP2SrHY0bTvwMTVu7zvTcp0ZenEGlY2DNr5zSd1n6lmS6rgAt1IPwhBzqI0PVMngaM0DQhB0wUPj3QoIUh0IyMVAQzRFbQpS4UGrA4M9a5a+AGy0jCQKiRCI+Yi9iZYEVYvfafF/lyOUHHYcpOg==' diff --git a/test/validate-cert.js b/test/validate-cert.js index b398bd6..7f4d9d6 100644 --- a/test/validate-cert.js +++ b/test/validate-cert.js @@ -124,7 +124,7 @@ test('fails on expired certificate (Not After)', function (t) { }) test('approves valid certifcate', function (t) { - const pem = fs.readFileSync(__dirname + '/echo-api-cert-10.cer') + const pem = fs.readFileSync(__dirname + '/echo-api-cert-11.cer') t.ok(validate(pem) === undefined, 'Certificate should be valid') t.end() })