mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-23 01:47:54 +02:00
parent
dbc88f9c1b
commit
f449f621e2
40
library/Icinga/Authentication/Tls.php
Normal file
40
library/Icinga/Authentication/Tls.php
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */
|
||||||
|
|
||||||
|
namespace Icinga\Authentication;
|
||||||
|
|
||||||
|
use Icinga\File\Storage\LocalFileStorage;
|
||||||
|
|
||||||
|
class Tls
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the absolute local filesystem path of the file with the certificates of the given TLS root CA collection
|
||||||
|
*
|
||||||
|
* The consumer of this interface can rely on the file's existence
|
||||||
|
* if they make use of {@link Icinga\Application\Hook\TlsRootCACertificateCollectionHook} respectively.
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function rootCaCertsFile($name)
|
||||||
|
{
|
||||||
|
return LocalFileStorage::common('tls/rootcacollections')->resolvePath(bin2hex($name) . '.pem');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the absolute local filesystem path of the file with the certificate
|
||||||
|
* and the private key of the given TLS client identity
|
||||||
|
*
|
||||||
|
* The consumer of this interface can rely on the file's existence
|
||||||
|
* if they make use of {@link Icinga\Application\Hook\TlsClientIdentityHook} respectively.
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function clientIdsFile($name)
|
||||||
|
{
|
||||||
|
return LocalFileStorage::common('tls/clientidentities')->resolvePath(bin2hex($name) . '.pem');
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user