aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/security/certificate.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-08-27 22:23:08 +0200
committerLukas Reschke <lukas@owncloud.com>2015-08-27 22:23:08 +0200
commitab8727493037731162563632bd05870c610d202d (patch)
tree21896c484f84ecb9811e50aaf7d46c36d9c8f00e /tests/lib/security/certificate.php
parent46978b616cf18d86c3b5790560d233ebde1fc8e7 (diff)
downloadnextcloud-server-ab8727493037731162563632bd05870c610d202d.tar.gz
nextcloud-server-ab8727493037731162563632bd05870c610d202d.zip
Use certificates that expire in 10 years
:speak_no_evil: :speak_no_evil: :speak_no_evil:
Diffstat (limited to 'tests/lib/security/certificate.php')
-rw-r--r--tests/lib/security/certificate.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/lib/security/certificate.php b/tests/lib/security/certificate.php
index 7fc8bbbdf25..81d159ebd52 100644
--- a/tests/lib/security/certificate.php
+++ b/tests/lib/security/certificate.php
@@ -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());
}