summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php25
-rw-r--r--apps/files_external/ajax/removeRootCertificate.php9
2 files changed, 0 insertions, 34 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
deleted file mode 100644
index 38b18605945..00000000000
--- a/apps/files_external/ajax/addRootCertificate.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-OCP\JSON::checkAppEnabled('files_external');
-OCP\JSON::callCheck();
-
-if (!($filename = $_FILES['rootcert_import']['name'])) {
- header('Location:' . OCP\Util::linkToRoute("settings_personal"));
- exit;
-}
-
-$fh = fopen($_FILES['rootcert_import']['tmp_name'], 'r');
-$data = fread($fh, filesize($_FILES['rootcert_import']['tmp_name']));
-fclose($fh);
-$filename = $_FILES['rootcert_import']['name'];
-
-$certificateManager = \OC::$server->getCertificateManager();
-
-if (!$certificateManager->addCertificate($data, $filename)) {
- OCP\Util::writeLog('files_external',
- 'Couldn\'t import SSL root certificate (' . $filename . '), allowed formats: PEM and DER',
- OCP\Util::WARN);
-}
-
-header('Location:' . OCP\Util::linkToRoute("settings_personal"));
-exit;
diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php
deleted file mode 100644
index 0931138ad4b..00000000000
--- a/apps/files_external/ajax/removeRootCertificate.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-OCP\JSON::checkAppEnabled('files_external');
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-
-$name = $_POST['cert'];
-$certificateManager = \OC::$server->getCertificateManager();
-$certificateManager->removeCertificate($name);