My Nagios server is- NagsioXI 5.8.3 running PHP 5.4.16
I can see from this thread for the nagios log server that its possible to change the TLS version without updating php- https://support.nagios.com/forum/viewto ... 38&t=61368
I have found the equivalent in NagiosXI -
\usr\local\nagiosxi\html\includes\phpmailer\class.smtp.php
So it seems like nagiosXI is already setup to allow for TLS 1.2, I added some simple code to make sure the "if" loop is being executed-
Code: Select all
public function startTLS()
{
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
return false;
}
$myfile = fopen("/tmp/newfile.txt", "w");
fwrite($myfile, "Script is executing\n");
//Allow the best TLS version(s) we can
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
//PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT
//so add them back in manually if we can
if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
fwrite($myfile, "TLS 1.2 found\n");
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}
fwrite($myfile, "closing\n");
fclose($myfile);
Script is executing
closing
which suggests that the loop is not executing to include TLS 1.2
Any idea how to fix? do i just need to update php?