mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-12-11 13:45:57 +08:00
Small fixes
This commit is contained in:
parent
7b8364830a
commit
fcac46f60e
2 changed files with 17 additions and 6 deletions
|
|
@ -2769,8 +2769,8 @@ class Actions
|
|||
$oDomain = $this->DomainProvider()->LoadOrCreateNewFromAction($this, 'domain-test-connection.de');
|
||||
if ($oDomain)
|
||||
{
|
||||
// $oOpenSSL = \MailSo\Base\Utils::FunctionExistsAndEnabled('openssl_x509_parse');
|
||||
$oOpenSSL = false; // TODO in dev
|
||||
// $bOpenSSL = \MailSo\Base\Utils::FunctionExistsAndEnabled('openssl_x509_parse');
|
||||
$bOpenSSL = false; // TODO in dev
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -2778,9 +2778,9 @@ class Actions
|
|||
$oImapClient->SetTimeOuts(5);
|
||||
|
||||
$iTime = \microtime(true);
|
||||
$oImapClient->Connect($oDomain->IncHost($oDomain->Name()), $oDomain->IncPort(), $oDomain->IncSecure(), $oOpenSSL);
|
||||
$oImapClient->Connect($oDomain->IncHost($oDomain->Name()), $oDomain->IncPort(), $oDomain->IncSecure(), $bOpenSSL);
|
||||
|
||||
if ($oOpenSSL)
|
||||
if ($bOpenSSL)
|
||||
{
|
||||
$aStreamContextParams = $oImapClient->StreamContextParams();
|
||||
if (isset($aStreamContextParams['options']['ssl']['peer_certificate']))
|
||||
|
|
@ -2815,7 +2815,18 @@ class Actions
|
|||
$oSmtpClient->SetTimeOuts(5);
|
||||
|
||||
$iTime = \microtime(true);
|
||||
$oSmtpClient->Connect($oDomain->OutHost($oDomain->Name()), $oDomain->OutPort(), '127.0.0.1', $oDomain->OutSecure());
|
||||
$oSmtpClient->Connect($oDomain->OutHost($oDomain->Name()), $oDomain->OutPort(), '127.0.0.1', $oDomain->OutSecure(), $bOpenSSL);
|
||||
|
||||
if ($bOpenSSL)
|
||||
{
|
||||
$aStreamContextParams = $oSmtpClient->StreamContextParams();
|
||||
if (isset($aStreamContextParams['options']['ssl']['peer_certificate']))
|
||||
{
|
||||
$aParseData = @\openssl_x509_parse($aStreamContextParams['options']['ssl']['peer_certificate']);
|
||||
$this->Logger()->WriteDump($aParseData);
|
||||
}
|
||||
}
|
||||
|
||||
$iSmtpTime = \microtime(true) - $iTime;
|
||||
$oSmtpClient->Disconnect();
|
||||
$bSmtpResult = true;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
'btn-danger': testingDone() && (testingImapError() || testingSmtpError()) }">
|
||||
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner animated': testing(), 'icon-white': testingDone()}"></i>
|
||||
|
||||
Test Connection
|
||||
Test
|
||||
</a>
|
||||
<a class="btn button-white-list pull-left" data-bind="command: whiteListCommand">
|
||||
<i data-bind="css: {'icon-right': !whiteListPage(), 'icon-left': whiteListPage()}"></i>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue