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
|
@ -1,13 +1,22 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIICATCCAWoCCQDNdmb4pJrUeDANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB
|
MIIDtTCCAp2gAwIBAgIJAJ9c5xX3Bf7cMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
|
||||||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0
|
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
|
||||||
cyBQdHkgTHRkMB4XDTE0MDgyNzA4NDg1MVoXDTE1MDgyNzA4NDg1MVowRTELMAkG
|
aWRnaXRzIFB0eSBMdGQwHhcNMTUwODI3MjAxOTEzWhcNMjUwODI0MjAxOTEzWjBF
|
||||||
A1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0
|
MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
|
||||||
IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvrMe
|
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
||||||
x5D45HVMV2U4kqTU0mzHAihHT6r+OtO6g7S9yIlJZGGVcEet6An78Ow7aYM141eI
|
CgKCAQEApYxB04E1rGUCopazf8PsW+3EYrX8J1Ze4g3jRJEmzqHLB4+T4h45LwLl
|
||||||
Jfbvqql7OIblHXSw7mvkw4bOQ1ee5lmJYOYCgaMNJ6mBLJfpK9xwidb0ZvhWOA8P
|
D7OLJCLdYA8sfEruInokNV1oUB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XFG54N7rI3UU
|
||||||
|
9e4Lc2NHQLv3Xv6FunC9mB/AUuEcI6XS6CqNyzAtPAvbO6MZGwUft/S/2TAyqJB0
|
||||||
|
VsXK3j3X8DJCwruNLGA3Q/TAYHqrElYg8N4b6w4LD91WbrRyWvkCXmM=
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
|
@ -1,15 +1,24 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
MIICazCCAdQCCQCySF7HjQD78DANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJD
|
MIIEADCCAuigAwIBAgIJAN0NPgU09qt9MA0GCSqGSIb3DQEBBQUAMF0xCzAJBgNV
|
||||||
SDEPMA0GA1UECBMGWnVyaWNoMQ8wDQYDVQQHEwZadXJpY2gxFjAUBgNVBAoTDW93
|
BAYTAkNIMRIwEAYDVQQIEwlTdC5HYWxsZW4xGjAYBgNVBAoTEW93bkNsb3VkIFNl
|
||||||
bkNsb3VkIEluYy4xETAPBgNVBAsTCFNlY3VyaXR5MR4wHAYDVQQDExVzZWN1cml0
|
Y3VyaXR5MR4wHAYDVQQDExVzZWN1cml0eS5vd25jbG91ZC5jb20wHhcNMTUwODI3
|
||||||
eS5vd25jbG91ZC5jb20wHhcNMTQwODI3MDg0NTUyWhcNMTUwODI3MDg0NTUyWjB6
|
MjAwMzQyWhcNMjUwODI0MjAwMzQyWjBdMQswCQYDVQQGEwJDSDESMBAGA1UECBMJ
|
||||||
MQswCQYDVQQGEwJDSDEPMA0GA1UECBMGWnVyaWNoMQ8wDQYDVQQHEwZadXJpY2gx
|
U3QuR2FsbGVuMRowGAYDVQQKExFvd25DbG91ZCBTZWN1cml0eTEeMBwGA1UEAxMV
|
||||||
FjAUBgNVBAoTDW93bkNsb3VkIEluYy4xETAPBgNVBAsTCFNlY3VyaXR5MR4wHAYD
|
c2VjdXJpdHkub3duY2xvdWQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAO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2xvdWQgU2VjdXJpdHkxHjAcBgNVBAMTFXNlY3VyaXR5Lm93bmNs
|
||||||
|
b3VkLmNvbYIJAN0NPgU09qt9MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
|
||||||
|
ggEBAJL9LKzWSJCTG0r+pNXw6Xy2DW9xbi3YsUeelkMKMqurmiH59P90juOJQgIC
|
||||||
|
B1Jcn/U0rzpJpolI3jJNjHzs/kI4MDkzcKGV84Pqwj+PSdMFK3OCWH/J81lUhrCj
|
||||||
|
H3yguZ/JpAisInVeBqg6lRf0X+S8jJIp4ZP2XZJsX70XgkRsEaC9TrlxtFsm839t
|
||||||
|
WhroMb25Njm9eAdSYrx5PFDwN8TtJlb5Ve3uZL8D0uBv+p0kWjkt1TrDk2x78F6b
|
||||||
|
5ExmE9+APc0gcLtSVwIGX6FDXOcOA8ndkp7p4K0CDnMZfFAU0oKxvnDxehrVKQEL
|
||||||
|
os/cq7EKmmsY/rM0uJ6L0ka4WUk=
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
|
@ -61,29 +61,26 @@ class CertificateTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetOrganization() {
|
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());
|
$this->assertSame('Internet Widgits Pty Ltd', $this->invalidCertificate->getOrganization());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetIssueDate() {
|
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());
|
$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());
|
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getIssueDate()->getTimestamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetExpireDate() {
|
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());
|
$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());
|
$this->assertEquals($expected->getTimestamp(), $this->invalidCertificate->getExpireDate()->getTimestamp());
|
||||||
$expected = new DateTime('2014-08-28 09:12:43 GMT');
|
$expected = new DateTime('2014-08-28 09:12:43 GMT');
|
||||||
$this->assertEquals($expected->getTimestamp(), $this->expiredCertificate->getExpireDate()->getTimestamp());
|
$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() {
|
public function testIsExpired() {
|
||||||
$this->assertSame(false, $this->goodCertificate->isExpired());
|
$this->assertSame(false, $this->goodCertificate->isExpired());
|
||||||
$this->assertSame(false, $this->invalidCertificate->isExpired());
|
$this->assertSame(false, $this->invalidCertificate->isExpired());
|
||||||
|
@ -97,7 +94,7 @@ class CertificateTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetIssuerOrganization() {
|
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->invalidCertificate->getIssuerOrganization());
|
||||||
$this->assertSame('Internet Widgits Pty Ltd', $this->expiredCertificate->getIssuerOrganization());
|
$this->assertSame('Internet Widgits Pty Ltd', $this->expiredCertificate->getIssuerOrganization());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue