mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Removed "Verify ssl certificate" setting (#332)
Added global "labs.verify_ssl_certificate" settings (default:true) (#332) Fixed php notices
This commit is contained in:
parent
56716cb5d3
commit
ecc2bdad24
12 changed files with 53 additions and 31 deletions
|
|
@ -126,7 +126,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort = 143
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = false
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Imap\ImapClient
|
||||
*
|
||||
|
|
@ -135,7 +135,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function Connect($sServerName, $iPort = 143,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = false)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->aTagTimeouts['*'] = \microtime(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class MailClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort = 143
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Mail\MailClient
|
||||
*
|
||||
|
|
@ -57,9 +58,9 @@ class MailClient
|
|||
* @throws \MailSo\Imap\Exceptions\Exception
|
||||
*/
|
||||
public function Connect($sServerName, $iPort = 143,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->oImapClient->Connect($sServerName, $iPort, $iSecurityType);
|
||||
$this->oImapClient->Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ abstract class NetClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = false
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
|
|
@ -194,7 +194,7 @@ abstract class NetClient
|
|||
* @throws \MailSo\Net\Exceptions\SocketCanNotConnectToHostException
|
||||
*/
|
||||
public function Connect($sServerName, $iPort,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = false)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
if (!\MailSo\Base\Validator::NotEmptyString($sServerName, true) || !\MailSo\Base\Validator::PortInt($iPort))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class Pop3Client extends \MailSo\Net\NetClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort = 110
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Pop3\Pop3Client
|
||||
*
|
||||
|
|
@ -61,11 +62,11 @@ class Pop3Client extends \MailSo\Net\NetClient
|
|||
* @throws \MailSo\Pop3\Exceptions\ResponseException
|
||||
*/
|
||||
public function Connect($sServerName, $iPort = 110,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->iRequestTime = microtime(true);
|
||||
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType);
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);
|
||||
$this->validateResponse();
|
||||
|
||||
if (\MailSo\Net\Enumerations\ConnectionSecurityType::UseStartTLS(
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class PoppassdClient extends \MailSo\Net\NetClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort = 106
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Poppassd\PoppassdClient
|
||||
*
|
||||
|
|
@ -49,11 +50,11 @@ class PoppassdClient extends \MailSo\Net\NetClient
|
|||
* @throws \MailSo\Poppassd\Exceptions\ResponseException
|
||||
*/
|
||||
public function Connect($sServerName, $iPort = 106,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->iRequestTime = \microtime(true);
|
||||
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType);
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);
|
||||
$this->validateResponse();
|
||||
|
||||
return $this;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
* @param string $sServerName
|
||||
* @param int $iPort
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Sieve\ManageSieveClient
|
||||
*
|
||||
|
|
@ -86,11 +87,11 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
* @throws \MailSo\Sieve\Exceptions\ResponseException
|
||||
*/
|
||||
public function Connect($sServerName, $iPort,
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->iRequestTime = microtime(true);
|
||||
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType);
|
||||
parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);
|
||||
|
||||
$mResponse = $this->parseResponse();
|
||||
$this->validateResponse($mResponse);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
* @param int $iPort = 25
|
||||
* @param string $sEhloHost = '[127.0.0.1]'
|
||||
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
|
||||
* @param bool $bVerifySsl = false
|
||||
* @param bool $bVerifySsl = true
|
||||
*
|
||||
* @return \MailSo\Smtp\SmtpClient
|
||||
*
|
||||
|
|
@ -150,7 +150,7 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
* @throws \MailSo\Smtp\Exceptions\ResponseException
|
||||
*/
|
||||
public function Connect($sServerName, $iPort = 25, $sEhloHost = '[127.0.0.1]',
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = false)
|
||||
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT, $bVerifySsl = true)
|
||||
{
|
||||
$this->iRequestTime = microtime(true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue