From f449f621e26bd0b89e5ca822d1f211ec429d11d5 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 22 Nov 2017 14:57:22 +0100 Subject: [PATCH] Add class Tls refs #3016 --- library/Icinga/Authentication/Tls.php | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 library/Icinga/Authentication/Tls.php diff --git a/library/Icinga/Authentication/Tls.php b/library/Icinga/Authentication/Tls.php new file mode 100644 index 000000000..51ebf9681 --- /dev/null +++ b/library/Icinga/Authentication/Tls.php @@ -0,0 +1,40 @@ +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'); + } +}