aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security/CertificateManager.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-03-15 13:03:34 +0100
committerGitHub <noreply@github.com>2024-03-15 13:03:34 +0100
commit9338ef36ded767f2c35b7ec575b351859420ed09 (patch)
tree65c53c6a36f300859dc22b2d423275bcf2911367 /lib/private/Security/CertificateManager.php
parent6b09a79227a5dc98aa4620c6e5e15b610a06c806 (diff)
parentdf1cd1ba7e6e1f6e66a2b3229b5c082f1b81162e (diff)
downloadnextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.tar.gz
nextcloud-server-9338ef36ded767f2c35b7ec575b351859420ed09.zip
Merge branch 'master' into refactor/OC-Server-getShareManager
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'lib/private/Security/CertificateManager.php')
-rw-r--r--lib/private/Security/CertificateManager.php29
1 files changed, 6 insertions, 23 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 3a87b7f1a00..cf5f0f41d56 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -44,21 +44,14 @@ use Psr\Log\LoggerInterface;
* Manage trusted certificates for users
*/
class CertificateManager implements ICertificateManager {
- protected View $view;
- protected IConfig $config;
- protected LoggerInterface $logger;
- protected ISecureRandom $random;
-
private ?string $bundlePath = null;
- public function __construct(View $view,
- IConfig $config,
- LoggerInterface $logger,
- ISecureRandom $random) {
- $this->view = $view;
- $this->config = $config;
- $this->logger = $logger;
- $this->random = $random;
+ public function __construct(
+ protected View $view,
+ protected IConfig $config,
+ protected LoggerInterface $logger,
+ protected ISecureRandom $random,
+ ) {
}
/**
@@ -178,7 +171,6 @@ class CertificateManager implements ICertificateManager {
*
* @param string $certificate the certificate data
* @param string $name the filename for the certificate
- * @return \OCP\ICertificate
* @throws \Exception If the certificate could not get added
*/
public function addCertificate(string $certificate, string $name): ICertificate {
@@ -205,9 +197,6 @@ class CertificateManager implements ICertificateManager {
/**
* Remove the certificate and re-generate the certificate bundle
- *
- * @param string $name
- * @return bool
*/
public function removeCertificate(string $name): bool {
if (!Filesystem::isValidPath($name)) {
@@ -225,8 +214,6 @@ class CertificateManager implements ICertificateManager {
/**
* Get the path to the certificate bundle
- *
- * @return string
*/
public function getCertificateBundle(): string {
return $this->getPathToCertificates() . 'rootcerts.crt';
@@ -267,8 +254,6 @@ class CertificateManager implements ICertificateManager {
/**
* Check if we need to re-bundle the certificates because one of the sources has updated
- *
- * @return bool
*/
private function needsRebundling(): bool {
$targetBundle = $this->getCertificateBundle();
@@ -282,8 +267,6 @@ class CertificateManager implements ICertificateManager {
/**
* get mtime of ca-bundle shipped by Nextcloud
- *
- * @return int
*/
protected function getFilemtimeOfCaBundle(): int {
return filemtime(\OC::$SERVERROOT . '/resources/config/ca-bundle.crt');