summaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax/removeRootCertificate.php
blob: e6795800e03f9a947a6de49799b35c055229322b (plain)
1
2
3
4
5
6
7
8
9
10
11
<?php

OCP\JSON::checkAppEnabled('files_external');
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();

$name = $_POST['cert'];
$certificateManager = \OC::$server->getCertificateManager();
if (\OC\Files\Filesystem::isValidPath($name)) {
	$certificateManager->removeCertificate($name);
}