HESK v3.2.4

This commit is contained in:
Luke Tainton
2021-11-20 10:45:31 +00:00
parent fd87e36f6b
commit 2c117f14cb
180 changed files with 12764 additions and 12390 deletions

View File

@@ -3,6 +3,8 @@
* smtp.php
*
* @(#) $Header: /opt2/ena/metal/smtp/smtp.php,v 1.52 2020/01/13 06:22:23 mlemos Exp $
*
* Fixed PHP => 5.6.7 < 7.2 TLS compatibility for HESK
*
*/
@@ -1307,7 +1309,18 @@ class smtp_class
{
if($this->debug)
$this->OutputDebug('Starting TLS cryptograpic protocol');
if(!($success = @stream_socket_enable_crypto($this->connection, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT)))
// 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')) {
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
}
if(!($success = @stream_socket_enable_crypto($this->connection, 1, $crypto_method)))
$this->error = 'could not start TLS connection encryption protocol';
else
{
@@ -1930,5 +1943,3 @@ class smtp_class
{/metadocument}
*/
?>