mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Added ConnectionSecurityType::TLS
This commit is contained in:
parent
7213395118
commit
6be84f8ab4
|
@ -20,6 +20,7 @@ abstract class ConnectionSecurityType
|
||||||
{
|
{
|
||||||
const NONE = 0;
|
const NONE = 0;
|
||||||
const SSL = 1;
|
const SSL = 1;
|
||||||
|
const TLS = 1;
|
||||||
const STARTTLS = 2;
|
const STARTTLS = 2;
|
||||||
const AUTO_DETECT = 9;
|
const AUTO_DETECT = 9;
|
||||||
|
|
||||||
|
|
|
@ -224,17 +224,14 @@ class Domain implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public static function StrConnectionSecurityTypeToCons(string $sType) : int
|
public static function StrConnectionSecurityTypeToCons(string $sType) : int
|
||||||
{
|
{
|
||||||
$iSecurityType = ConnectionSecurityType::NONE;
|
|
||||||
switch (\strtoupper($sType))
|
switch (\strtoupper($sType))
|
||||||
{
|
{
|
||||||
case 'SSL':
|
case 'SSL':
|
||||||
$iSecurityType = ConnectionSecurityType::SSL;
|
return ConnectionSecurityType::SSL;
|
||||||
break;
|
|
||||||
case 'TLS':
|
case 'TLS':
|
||||||
$iSecurityType = ConnectionSecurityType::STARTTLS;
|
return ConnectionSecurityType::STARTTLS;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return $iSecurityType;
|
return ConnectionSecurityType::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[\ReturnTypeWillChange]
|
#[\ReturnTypeWillChange]
|
||||||
|
|
Loading…
Reference in a new issue