From 162f4d48c84e3036df25b76527d0390268cb277b Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 13 Jan 2022 07:54:10 -0800 Subject: [PATCH] update latest cert so unit tests pass --- ...ho-api-cert-9.pem => echo-api-cert-10.cer} | 56 ++++++++++--------- test/index.js | 2 +- test/validate-cert.js | 2 +- 3 files changed, 31 insertions(+), 29 deletions(-) rename test/{echo-api-cert-9.pem => echo-api-cert-10.cer} (74%) diff --git a/test/echo-api-cert-9.pem b/test/echo-api-cert-10.cer similarity index 74% rename from test/echo-api-cert-9.pem rename to test/echo-api-cert-10.cer index f63b2b9..8af665d 100644 --- a/test/echo-api-cert-9.pem +++ b/test/echo-api-cert-10.cer @@ -1,34 +1,36 @@ -----BEGIN CERTIFICATE----- -MIIFcDCCBFigAwIBAgIQCoVR+Rf6FN31ezpuGY39bTANBgkqhkiG9w0BAQsFADBG +MIIF3jCCBMagAwIBAgIQASsRtcjaANz51ZqQaypmYDANBgkqhkiG9w0BAQsFADBG MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg -Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMDEyMTEwMDAwMDBaFw0yMTExMTYy +Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMTA4MzEwMDAwMDBaFw0yMjA4MDQy MzU5NTlaMB4xHDAaBgNVBAMTE2VjaG8tYXBpLmFtYXpvbi5jb20wggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCSjIho0ATYb0MjLdh9Zm6H5+eiV+I2hydR -N2BM/H626EfAxe3Ngj9RDPJodjoayeXM4bYDAd4nSpATfn89KvMcmhwKy3Nln/Eh -9mwfJUq4PSitbHwnGUA2DYNPy1j0Lg9t8BxNqzL3oeMhccEGhsOuQBCBTPshrxPE -aLATgZphjFMh7ei5ARYa3DZcfXRpqQdO6yBT9b5QzIeJELVJslZYNfFan3P0Is7H -10pKIydgsH68bEJv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WEQt 8jxwmKy6abaVd38PMV4s/KCHOkdp8Hlf9BRUpJVeEXgSYCfOn8J3/yNTd126/+pZ 59vPr5KW7ySaNRB6nJHGDn2Z9j8Z3/VyVOEVqQdZe4O/Ui5GjLIAZHYcSNPYeehu VsyuLAOQ1xk4meTKCRlb/weWsKh/NEnfVqn3sF/tM+2MR7cwA130A4w= ------END CERTIFICATE----- \ No newline at end of file +-----END CERTIFICATE----- diff --git a/test/index.js b/test/index.js index d95ebd6..ea33a4a 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-9.pem' // latest valid cert +const cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-10.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 b29dd23..b398bd6 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-9.pem') + const pem = fs.readFileSync(__dirname + '/echo-api-cert-10.cer') t.ok(validate(pem) === undefined, 'Certificate should be valid') t.end() })