Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rainloop/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public function GetLogginedUser()
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
* @param bool $bVerifySsl = false
* @param bool $bAllowSelfSigned = true
* @param string $sClientCert = NULL
*
* @return \MailSo\Imap\ImapClient
*
Expand All @@ -146,11 +147,12 @@ public function GetLogginedUser()
*/
public function Connect($sServerName, $iPort = 143,
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT,
$bVerifySsl = false, $bAllowSelfSigned = true)
$bVerifySsl = false, $bAllowSelfSigned = true,
$sClientCert = '')
{
$this->aTagTimeouts['*'] = \microtime(true);

parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl, $bAllowSelfSigned);
parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl, $bAllowSelfSigned, $sClientCert);

$this->parseResponseWithValidation('*', true);

Expand Down
5 changes: 3 additions & 2 deletions rainloop/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function ImapClient()
* @param int $iPort = 143
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
* @param bool $bVerifySsl = false
* @param string $sClientCert = ""
*
* @return \MailSo\Mail\MailClient
*
Expand All @@ -67,9 +68,9 @@ public function ImapClient()
* @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 = false, $bAllowSelfSigned = false, $sClientCert = '')
{
$this->oImapClient->Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);
$this->oImapClient->Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl, $bAllowSelfSigned, $sClientCert);
return $this;
}

Expand Down
8 changes: 5 additions & 3 deletions rainloop/v/0.0.0/app/libraries/MailSo/Net/NetClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public function capturePhpErrorWithException($iErrNo, $sErrStr, $sErrFile, $iErr
* @param int $iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT
* @param bool $bVerifySsl = false
* @param bool $bAllowSelfSigned = true
* @param string $sClientCert = NULL
*
* @return void
*
Expand All @@ -205,7 +206,8 @@ public function capturePhpErrorWithException($iErrNo, $sErrStr, $sErrFile, $iErr
*/
public function Connect($sServerName, $iPort,
$iSecurityType = \MailSo\Net\Enumerations\ConnectionSecurityType::AUTO_DETECT,
$bVerifySsl = false, $bAllowSelfSigned = true)
$bVerifySsl = false, $bAllowSelfSigned = true,
$sClientCert = '')
{
if (!\MailSo\Base\Validator::NotEmptyString($sServerName, true) || !\MailSo\Base\Validator::PortInt($iPort))
{
Expand Down Expand Up @@ -254,13 +256,13 @@ public function Connect($sServerName, $iPort,

$bVerifySsl = !!$bVerifySsl;
$bAllowSelfSigned = $bVerifySsl ? !!$bAllowSelfSigned : true;

$aStreamContextSettings = array(
'ssl' => array(
'verify_host' => $bVerifySsl,
'verify_peer' => $bVerifySsl,
'verify_peer_name' => $bVerifySsl,
'allow_self_signed' => $bAllowSelfSigned
'allow_self_signed' => $bAllowSelfSigned,
'local_cert' => $sClientCert
)
);

Expand Down
Loading