aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-05-25 17:03:18 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-10 18:27:38 +0200
commit6d881c10e838cf3a99a27073383c8f74439a40b6 (patch)
tree91513c64c8dcdecabb0ec163c7d460af2e2edc47 /lib
parent7073c21e2db6292df6270e3fdb64a04dcce72943 (diff)
downloadnextcloud-server-6d881c10e838cf3a99a27073383c8f74439a40b6.tar.gz
nextcloud-server-6d881c10e838cf3a99a27073383c8f74439a40b6.zip
log failures to read certificates during listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/CertificateManager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index b9fbdcc9f02..3a87b7f1a00 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -83,8 +83,14 @@ class CertificateManager implements ICertificateManager {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
try {
- $result[] = new Certificate($this->view->file_get_contents($path . $file), $file);
+ $content = $this->view->file_get_contents($path . $file);
+ if ($content !== false) {
+ $result[] = new Certificate($content, $file);
+ } else {
+ $this->logger->error("Failed to read certificate from $path");
+ }
} catch (\Exception $e) {
+ $this->logger->error("Failed to read certificate from $path", ['exception' => $e]);
}
}
}