Merge pull request #18610 from owncloud/use-certificates-that-expire-in10-years
[master] Use certificates that expire in 10 years
This commit is contained in:
commit
efeef958a3
3 changed files with 48 additions and 33 deletions
|
@ -1,13 +1,22 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICATCCAWoCCQDNdmb4pJrUeDANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB
|
||||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
|
||||
cyBQdHkgTHRkMB4XDTE0MDgyNzA4NDg1MVoXDTE1MDgyNzA4NDg1MVowRTELMAkG
|
||||
A1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0
|
||||
IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvrMe
|
||||
x5D45HVMV2U4kqTU0mzHAihHT6r+OtO6g7S9yIlJZGGVcEet6An78Ow7aYM141eI
|
||||
Jfbvqql7OIblHXSw7mvkw4bOQ1ee5lmJYOYCgaMNJ6mBLJfpK9xwidb0ZvhWOA8P
|
||||
DLIiBKA3T5ChXCzilD5GF2+H/BXBE9lL9tuDjM0CAwEAATANBgkqhkiG9w0BAQUF
|
||||
AAOBgQCJwfJe7j+aNkopw+P8uxobfOnMWU9XC4Pu+39TVLeakeSqu2Y8vJSHmkjF
|
||||
WK3VXAJr33Eul5VP/3SWGwuRPd9X4i4iLh1gJfYvi9MJf1lQNYncGCM+xtdrNu2O
|
||||
u0yexkOBRrapDYjcv58BiOaFgvFLquKvtVj9HlcYRfwfM77uKQ==
|
||||
MIIDtTCCAp2gAwIBAgIJAJ9c5xX3Bf7cMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
|
||||
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||
aWRnaXRzIFB0eSBMdGQwHhcNMT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FG54N7rI3UU
|
||||
9e4Lc2NHQLv3Xv6FunC9mB/AUuEcI6XS6CqNyzAtPAvbO6MZGwUft/S/2TAyqJB0
|
||||
VsXK3j3X8DJCwruNLGA3Q/TAYHqrElYg8N4b6w4LD91WbrRyWvkCXmM=
|
||||
-----END CERTIFICATE-----
|
|
@ -1,15 +1,24 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIICazCCAdQCCQCySF7HjQD78DANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJD
|
||||
SDEPMA0GA1UECBMGWnVyaWNoMQ8wDQYDVQQHEwZadXJpY2gxFjAUBgNVBAoTDW93
|
||||
bkNsb3VkIEluYy4xETAPBgNVBAsTCFNlY3VyaXR5MR4wHAYDVQQDExVzZWN1cml0
|
||||
eS5vd25jbG91ZC5jb20wHhcNMTQwODI3MDg0NTUyWhcNMTUwODI3MDg0NTUyWjB6
|
||||
MQswCQYDVQQGEwJDSDEPMA0GA1UECBMGWnVyaWNoMQ8wDQYDVQQHEwZadXJpY2gx
|
||||
FjAUBgNVBAoTDW93bkNsb3VkIEluYy4xETAPBgNVBAsTCFNlY3VyaXR5MR4wHAYD
|
||||
VQQDExVzZWN1cml0eS5vd25jbG91ZC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
|
||||
MIGJAoGBAL55lB4RvU0pTyh7YsLCxPBq43xxkRZBxfZENoflCIUsBo7/mXNz2zVO
|
||||
476oQ4L47heUOX3j8kemOgPmWEqA34JB8rusijCy5WqFBLnm4HsRLa66i+Jgd+Yl
|
||||
QhcKvhGas1K/CVTG4oSLoAmA2coZUL94uxnRtd8aluflHMNGApIlAgMBAAEwDQYJ
|
||||
KoZIhvcNAQEFBQADgYEADo08zWdOtIvCKFDnLbzRwIjSYTlAtQtQaULv7KQe3qIn
|
||||
iaFAi6fAynHfdC8/2tvmSeniw0OZBkrfVGIVtUbwCSrljNSUY/lWrUR0pE61lb4r
|
||||
DpX0JZjlk48XEaErRVDfu3wq6n/2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gNVBAMTFXNlY3VyaXR5Lm93bmNs
|
||||
b3VkLmNvbYIJAN0NPgU09qt9MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
|
||||
ggEBAJL9LKzWSJCTG0r+pNXw6Xy2DW9xbi3YsUeelkMKMqurmiH59P90juOJQgIC
|
||||
B1Jcn/U0rzpJpolI3jJNjHzs/kI4MDkzcKGV84Pqwj+PSdMFK3OCWH/J81lUhrCj
|
||||
H3yguZ/JpAisInVeBqg6lRf0X+S8jJIp4ZP2XZJsX70XgkRsEaC9TrlxtFsm839t
|
||||
WhroMb25Njm9eAdSYrx5PFDwN8TtJlb5Ve3uZL8D0uBv+p0kWjkt1TrDk2x78F6b
|
||||
5ExmE9+APc0gcLtSVwIGX6FDXOcOA8ndkp7p4K0CDnMZfFAU0oKxvnDxehrVKQEL
|
||||
os/cq7EKmmsY/rM0uJ6L0ka4WUk=
|
||||
-----END CERTIFICATE-----
|
|
@ -61,29 +61,26 @@ class CertificateTest extends \Test\TestCase {
|
|||
}
|
||||
|
||||
public function testGetOrganization() {
|
||||
$this->assertSame('ownCloud Inc.', $this->goodCertificate->getOrganization());
|
||||
$this->assertSame('ownCloud Security', $this->goodCertificate->getOrganization());
|
||||
$this->assertSame('Internet Widgits Pty Ltd', $this->invalidCertificate->getOrganization());
|
||||
}
|
||||
|
||||
public function testGetIssueDate() {
|
||||
$expected = new DateTime('2014-08-27 08:45:52 GMT');
|
||||
$expected = new DateTime('2015-08-27 20:03:42 GMT');
|
||||
$this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getIssueDate()->getTimestamp());
|
||||
$expected = new DateTime('2014-08-27 08:48:51 GMT');
|
||||
$expected = new DateTime('2015-08-27 20:19:13 GMT');
|
||||
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getIssueDate()->getTimestamp());
|
||||
}
|
||||
|
||||
public function testGetExpireDate() {
|
||||
$expected = new DateTime('2015-08-27 08:45:52 GMT');
|
||||
$expected = new DateTime('2025-08-24 20:03:42 GMT');
|
||||
$this->assertEquals($expected->getTimestamp(), $this->goodCertificate->getExpireDate()->getTimestamp());
|
||||
$expected = new DateTime('2015-08-27 08:48:51 GMT');
|
||||
$expected = new DateTime('2025-08-24 20:19:13 GMT');
|
||||
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getExpireDate()->getTimestamp());
|
||||
$expected = new DateTime('2014-08-28 09:12:43 GMT');
|
||||
$this->assertEquals($expected->getTimestamp(), $this->expiredCertificate->getExpireDate()->getTimestamp());
|
||||
}
|
||||
|
||||
/**
|
||||
* Obviously the following test case might fail after 2015-08-27, just create a new certificate with longer validity then
|
||||
*/
|
||||
public function testIsExpired() {
|
||||
$this->assertSame(false, $this->goodCertificate->isExpired());
|
||||
$this->assertSame(false, $this->invalidCertificate->isExpired());
|
||||
|
@ -97,7 +94,7 @@ class CertificateTest extends \Test\TestCase {
|
|||
}
|
||||
|
||||
public function testGetIssuerOrganization() {
|
||||
$this->assertSame('ownCloud Inc.', $this->goodCertificate->getIssuerOrganization());
|
||||
$this->assertSame('ownCloud Security', $this->goodCertificate->getIssuerOrganization());
|
||||
$this->assertSame('Internet Widgits Pty Ltd', $this->invalidCertificate->getIssuerOrganization());
|
||||
$this->assertSame('Internet Widgits Pty Ltd', $this->expiredCertificate->getIssuerOrganization());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue