diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-07-11 15:51:48 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-07-11 15:51:48 +0200 |
commit | 7c64e1973fdcb41758c221118c6167668a563953 (patch) | |
tree | 829ce6b82f34a3b1883a6865f8e994d5d74a8d69 /lib/private | |
parent | d15fd5cb96043f908f8fdb9e111f1c8686a0434b (diff) | |
download | nextcloud-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.php | 12 |
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'); + } + } |