|
|
@ -72,7 +72,7 @@ class CertificateController extends Controller { |
|
|
* |
|
|
* |
|
|
* @NoAdminRequired |
|
|
* @NoAdminRequired |
|
|
* @NoSubadminRequired |
|
|
* @NoSubadminRequired |
|
|
* @return array |
|
|
|
|
|
|
|
|
* @return DataResponse |
|
|
*/ |
|
|
*/ |
|
|
public function addPersonalRootCertificate() { |
|
|
public function addPersonalRootCertificate() { |
|
|
return $this->addCertificate($this->userCertificateManager); |
|
|
return $this->addCertificate($this->userCertificateManager); |
|
|
@ -114,7 +114,7 @@ class CertificateController extends Controller { |
|
|
$headers |
|
|
$headers |
|
|
); |
|
|
); |
|
|
} catch (\Exception $e) { |
|
|
} catch (\Exception $e) { |
|
|
return new DataResponse('An error occurred.', Http::STATUS_UNPROCESSABLE_ENTITY, $headers); |
|
|
|
|
|
|
|
|
return new DataResponse(['An error occurred.'], Http::STATUS_UNPROCESSABLE_ENTITY, $headers); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -129,7 +129,7 @@ class CertificateController extends Controller { |
|
|
public function removePersonalRootCertificate($certificateIdentifier) { |
|
|
public function removePersonalRootCertificate($certificateIdentifier) { |
|
|
|
|
|
|
|
|
if ($this->isCertificateImportAllowed() === false) { |
|
|
if ($this->isCertificateImportAllowed() === false) { |
|
|
return new DataResponse('Individual certificate management disabled', Http::STATUS_FORBIDDEN); |
|
|
|
|
|
|
|
|
return new DataResponse(['Individual certificate management disabled'], Http::STATUS_FORBIDDEN); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$this->userCertificateManager->removeCertificate($certificateIdentifier); |
|
|
$this->userCertificateManager->removeCertificate($certificateIdentifier); |
|
|
@ -156,7 +156,7 @@ class CertificateController extends Controller { |
|
|
/** |
|
|
/** |
|
|
* Add a new personal root certificate to the system's trust store |
|
|
* Add a new personal root certificate to the system's trust store |
|
|
* |
|
|
* |
|
|
* @return array |
|
|
|
|
|
|
|
|
* @return DataResponse |
|
|
*/ |
|
|
*/ |
|
|
public function addSystemRootCertificate() { |
|
|
public function addSystemRootCertificate() { |
|
|
return $this->addCertificate($this->systemCertificateManager); |
|
|
return $this->addCertificate($this->systemCertificateManager); |
|
|
@ -171,7 +171,7 @@ class CertificateController extends Controller { |
|
|
public function removeSystemRootCertificate($certificateIdentifier) { |
|
|
public function removeSystemRootCertificate($certificateIdentifier) { |
|
|
|
|
|
|
|
|
if ($this->isCertificateImportAllowed() === false) { |
|
|
if ($this->isCertificateImportAllowed() === false) { |
|
|
return new DataResponse('Individual certificate management disabled', Http::STATUS_FORBIDDEN); |
|
|
|
|
|
|
|
|
return new DataResponse(['Individual certificate management disabled'], Http::STATUS_FORBIDDEN); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$this->systemCertificateManager->removeCertificate($certificateIdentifier); |
|
|
$this->systemCertificateManager->removeCertificate($certificateIdentifier); |
|
|
|