From 5d61b85a1dace6ebb41025deaad019af8b3e5145 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 4 Jul 2012 17:16:02 +0200 Subject: allow users to upload ssl root certificates for the webdav client --- apps/files_external/lib/config.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'apps/files_external/lib') diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 95f8beeb49e..4e82e6b2548 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -237,6 +237,21 @@ class OC_Mount_Config { $content .= ");\n?>"; @file_put_contents($file, $content); } + + /** + * Returns all user uploaded ssl root certificates + * @return array + */ + public static function getCertificates() { + $view = \OCP\Files::getStorage('files_external'); + $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(""); + $result = array(); + $handle = opendir($path); + while (false !== ($file = readdir($handle))) { + if($file != '.' && $file != '..') $result[] = $file; + } + return $result; + } } -- cgit v1.2.3