From f4d8bfc309c88abfe282df2c4dc8303da76dfb51 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch <matthias.jentsch@netways.de> Date: Tue, 14 Jul 2015 18:36:26 +0200 Subject: [PATCH] Display connection test info when inspecting LdapConnections refs #9605 --- library/Icinga/Protocol/Ldap/LdapConnection.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 6ac69906c..479b8e78b 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -969,6 +969,10 @@ class LdapConnection implements Selectable, Inspectable $hostname = $this->hostname; if ($this->encryption === static::LDAPS) { + $this->logInfo('Connect using LDAPS'); + if (! $this->validateCertificate) { + $this->logInfo('Skipping certificate validation'); + } $hostname = 'ldaps://' . $hostname; } @@ -1156,7 +1160,7 @@ class LdapConnection implements Selectable, Inspectable public function getInfo() { if (! isset($this->info)) { - $this->getConnection(); + $this->testConnectionHealth(); } return $this->info; }