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 SSL = 1;
|
||||
const TLS = 1;
|
||||
const STARTTLS = 2;
|
||||
const AUTO_DETECT = 9;
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue