aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-04-21 18:55:33 +0200
committerLukas Reschke <lukas@owncloud.com>2016-04-21 18:56:58 +0200
commitd3f585c329c0291b208dc54d75b4aecb7118ff8d (patch)
tree717f37417db06f3666c6664c70ad436a261d0fd0 /tests
parent8bd3ea08eb1b24770857d922c8616e8c0b5f96e3 (diff)
downloadnextcloud-server-d3f585c329c0291b208dc54d75b4aecb7118ff8d.tar.gz
nextcloud-server-d3f585c329c0291b208dc54d75b4aecb7118ff8d.zip
[stable8.2] Ignore certificate file if it starts with file://
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/security/certificate.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/security/certificate.php b/tests/lib/security/certificate.php
index 81d159ebd52..82e91c71733 100644
--- a/tests/lib/security/certificate.php
+++ b/tests/lib/security/certificate.php
@@ -50,6 +50,14 @@ class CertificateTest extends \Test\TestCase {
$certificate->getIssueDate();
}
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage Certificate could not get parsed.
+ */
+ function testCertificateStartingWithFileReference() {
+ new Certificate('file://'.__DIR__ . '/../../data/certificates/goodCertificate.crt', 'bar');
+ }
+
public function testGetName() {
$this->assertSame('GoodCertificate', $this->goodCertificate->getName());
$this->assertSame('BadCertificate', $this->invalidCertificate->getName());