Skip to content
Snippets Groups Projects
Commit 0d0377eb authored by Robin Appelman's avatar Robin Appelman
Browse files

Add a config option to enable certificate management

parent c15cab7e
No related branches found
No related tags found
No related merge requests found
......@@ -846,6 +846,11 @@ $CONFIG = array(
'config' => '/absolute/location/of/openssl.cnf',
),
/**
* Allow the configuration of system wide trusted certificates
*/
'enable_certificate_management' => false,
/**
* Memory caching backend configuration
*
......
......@@ -158,12 +158,14 @@ $template->assign('OutdatedCacheWarning', $outdatedCaches);
// add hardcoded forms from the template
$forms = OC_App::getForms('admin');
$certificatesTemplate = new OC_Template('settings', 'certificates');
$certificatesTemplate->assign('type', 'admin');
$certificatesTemplate->assign('uploadRoute', 'settings.Certificate.addSystemRootCertificate');
$certificatesTemplate->assign('certs', $certificateManager->listCertificates());
$certificatesTemplate->assign('urlGenerator', $urlGenerator);
$forms[] = $certificatesTemplate->fetchPage();
if ($config->getSystemValue('enable_certificate_management', false)) {
$certificatesTemplate = new OC_Template('settings', 'certificates');
$certificatesTemplate->assign('type', 'admin');
$certificatesTemplate->assign('uploadRoute', 'settings.Certificate.addSystemRootCertificate');
$certificatesTemplate->assign('certs', $certificateManager->listCertificates());
$certificatesTemplate->assign('urlGenerator', $urlGenerator);
$forms[] = $certificatesTemplate->fetchPage();
}
$formsAndMore = array();
if ($request->getServerProtocol() !== 'https' || !OC_Util::isAnnotationsWorking() ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment