diff options
Diffstat (limited to 'lib/private/Security/CertificateManager.php')
-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'); + } + } |