diff --git a/test/echo-api-cert-11.cer b/test/echo-api-cert-12.cer similarity index 50% rename from test/echo-api-cert-11.cer rename to test/echo-api-cert-12.cer index 713dc11..916cd30 100644 --- a/test/echo-api-cert-11.cer +++ b/test/echo-api-cert-12.cer @@ -1,61 +1,62 @@ -----BEGIN CERTIFICATE----- -MIIF3TCCBMWgAwIBAgIQBcM1jabruTKfD4gLTlR22zANBgkqhkiG9w0BAQsFADBG -MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRUwEwYDVQQLEwxTZXJ2ZXIg -Q0EgMUIxDzANBgNVBAMTBkFtYXpvbjAeFw0yMjA2MTYwMDAwMDBaFw0yMzA2MTUy -MzU5NTlaMB4xHDAaBgNVBAMTE2VjaG8tYXBpLmFtYXpvbi5jb20wggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvc9jDA5sUKmRHIWI+hvQTeDu+YKEI2ayT -LQLX9E+ZuuRuDshIgBlsiqO7pDTiVdrpa+pHC/jdDQ/PK8WkXuGNT9EwxixL4rsr -6bnv9O6eB5qzaLdsasU5qj+mviP/d7XLueWwr7BP/6mBx65D2qgkmklBTadDYy/S -Og0NZ+vjSz8iPkVMSrhpRINJnZ/rt1JNgLweJLINW38L0pcjhOdj7WRR4R6CEpcZ -/VRaO0TS4hrhLtLToBuKzPQ/StoYDAxKLd7BZjWAGOxWH+OseJCxTzcCE2H5GJVZ -9qQoFrjtiNFFoDMOE3VXZ8hGUl+3gPfkGjyx+/hlpz1pvWsquzv3AgMBAAGjggLt -MIIC6TAfBgNVHSMEGDAWgBRZpGYGUqB7lZI8o5QHJ5Z0W/k90DAdBgNVHQ4EFgQU -ZNbgX/wwUKwd33+6BBShKLczLBEwHgYDVR0RBBcwFYITZWNoby1hcGkuYW1hem9u -LmNvbTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF -BwMCMD0GA1UdHwQ2MDQwMqAwoC6GLGh0dHA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/BAQDAgGGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNV +HQ4EFgQUgbgOY4qJEhjl+js7UJWf5uWQE4UwHwYDVR0jBBgwFoAUhBjMhTTsvAyU +lC4IWZzHshBOCggwewYIKwYBBQUHAQEEbzBtMC8GCCsGAQUFBzABhiNodHRwOi8v +b2NzcC5yb290Y2ExLmFtYXpvbnRydXN0LmNvbTA6BggrBgEFBQcwAoYuaHR0cDov +L2NydC5yb290Y2ExLmFtYXpvbnRydXN0LmNvbS9yb290Y2ExLmNlcjA/BgNVHR8E +ODA2MDSgMqAwhi5odHRwOi8vY3JsLnJvb3RjYTEuYW1hem9udHJ1c3QuY29tL3Jv +b3RjYTEuY3JsMBMGA1UdIAQMMAowCAYGZ4EMAQIBMA0GCSqGSIb3DQEBCwUAA4IB +AQCtAN4CBSMuBjJitGuxlBbkEUDeK/pZwTXv4KqPK0G50fOHOQAd8j21p0cMBgbG +kfMHVwLU7b0XwZCav0h1ogdPMN1KakK1DT0VwA/+hFvGPJnMV1Kx2G4S1ZaSk0uU +5QfoiYIIano01J5k4T2HapKQmmOhS/iPtuo00wW+IMLeBuKMn3OLn005hcrOGTad +hcmeyfhQP7Z+iKHvyoQGi1C0ClymHETx/chhQGDyYSWqB/THwnN15AwLQo0E5V9E +SJlbe4mBlqeInUsNYugExNf+tOiybcrswBy8OFsd34XOW3rjSUtsuafd9AWySa3h +xRRrwszrzX/WWGm6wyB+f7C4 -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIEkjCCA3qgAwIBAgITBn+USionzfP6wq4rAfkI7rnExjANBgkqhkiG9w0BAQsF diff --git a/test/index.js b/test/index.js index aecf4b6..a97c079 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-11.pem' // latest valid cert +const cert_url = 'https://s3.amazonaws.com/echo.api/echo-api-cert-12.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 7f4d9d6..1f7e9dd 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-11.cer') + const pem = fs.readFileSync(__dirname + '/echo-api-cert-12.cer') t.ok(validate(pem) === undefined, 'Certificate should be valid') t.end() })