CertificateManager

class OC\Security\CertificateManager
Manage trusted certificates for users
Source:lib/private/Security/CertificateManager.php#45
Implements:OCP\ICertificateManager

Properties

protected static property OC\Security\CertificateManager::$view
Source:lib/private/Security/CertificateManager.php#49
Type:\OC\Files\View
protected static property OC\Security\CertificateManager::$config
Source:lib/private/Security/CertificateManager.php#54
Type:\OCP\IConfig
protected static property OC\Security\CertificateManager::$logger
Source:lib/private/Security/CertificateManager.php#59
Type:\OCP\ILogger
protected static property OC\Security\CertificateManager::$random
Source:lib/private/Security/CertificateManager.php#62
Type:\OCP\Security\ISecureRandom

Methods

public OC\Security\CertificateManager::__construct($view, $config, $logger, $random)
Source:

lib/private/Security/CertificateManager.php#70

Parameters:
public OC\Security\CertificateManager::listCertificates()
Returns all certificates trusted by the user
Source:lib/private/Security/CertificateManager.php#85
Returns:\OCP\ICertificate[]
public OC\Security\CertificateManager::createCertificateBundle()
create the certificate bundle of all trusted certificated
Source:lib/private/Security/CertificateManager.php#137
public OC\Security\CertificateManager::addCertificate($certificate, $name)
Save the certificate and re-generate the certificate bundle
Source:

lib/private/Security/CertificateManager.php#189

Parameters:
  • $certificate (string) the certificate data
  • $name (string) the filename for the certificate
Returns:

\OCP\ICertificate

Throws:

\Exception If the certificate could not get added

public OC\Security\CertificateManager::removeCertificate($name)
Remove the certificate and re-generate the certificate bundle
Source:

lib/private/Security/CertificateManager.php#216

Parameters:
  • $name (string)
Returns:

bool

public OC\Security\CertificateManager::getCertificateBundle()
Get the path to the certificate bundle
Source:lib/private/Security/CertificateManager.php#233
Returns:string
public OC\Security\CertificateManager::getAbsoluteBundlePath()
Get the full local path to the certificate bundle
Source:lib/private/Security/CertificateManager.php#242
Returns:string
protected OC\Security\CertificateManager::getFilemtimeOfCaBundle()
get mtime of ca-bundle shipped by Nextcloud
Source:lib/private/Security/CertificateManager.php#281
Returns:int