Added ConnectionSecurityType::TLS

This commit is contained in:
the-djmaze 2024-03-27 01:24:34 +01:00
parent 7213395118
commit 6be84f8ab4
2 changed files with 4 additions and 6 deletions

View file

@ -20,6 +20,7 @@ abstract class ConnectionSecurityType
{
const NONE = 0;
const SSL = 1;
const TLS = 1;
const STARTTLS = 2;
const AUTO_DETECT = 9;

View file

@ -224,17 +224,14 @@ class Domain implements \JsonSerializable
*/
public static function StrConnectionSecurityTypeToCons(string $sType) : int
{
$iSecurityType = ConnectionSecurityType::NONE;
switch (\strtoupper($sType))
{
case 'SSL':
$iSecurityType = ConnectionSecurityType::SSL;
break;
return ConnectionSecurityType::SSL;
case 'TLS':
$iSecurityType = ConnectionSecurityType::STARTTLS;
break;
return ConnectionSecurityType::STARTTLS;
}
return $iSecurityType;
return ConnectionSecurityType::NONE;
}
#[\ReturnTypeWillChange]