summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-07-11 15:51:48 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2016-07-11 15:51:48 +0200
commit7c64e1973fdcb41758c221118c6167668a563953 (patch)
tree829ce6b82f34a3b1883a6865f8e994d5d74a8d69 /lib/private
parentd15fd5cb96043f908f8fdb9e111f1c8686a0434b (diff)
downloadnextcloud-server-7c64e1973fdcb41758c221118c6167668a563953.tar.gz
nextcloud-server-7c64e1973fdcb41758c221118c6167668a563953.zip
add test for needsRebundling() check
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Security/CertificateManager.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 77d0c844b8c..1639df01a21 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -233,7 +233,7 @@ class CertificateManager implements ICertificateManager {
if ($uid === '') {
$uid = $this->uid;
}
- $sourceMTimes = [filemtime(\OC::$SERVERROOT . '/resources/config/ca-bundle.crt')];
+ $sourceMTimes = [$this->getFilemtimeOfCaBundle()];
$targetBundle = $this->getCertificateBundle($uid);
if (!$this->view->file_exists($targetBundle)) {
return true;
@@ -248,4 +248,14 @@ class CertificateManager implements ICertificateManager {
}, 0);
return $sourceMTime > $this->view->filemtime($targetBundle);
}
+
+ /**
+ * get mtime of ca-bundle shipped by Nextcloud
+ *
+ * @return int
+ */
+ protected function getFilemtimeOfCaBundle() {
+ return filemtime(\OC::$SERVERROOT . '/resources/config/ca-bundle.crt');
+ }
+
}