mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-07 15:27:43 +08:00
SHA-512 #182
This commit is contained in:
parent
27161cd258
commit
29fa090795
4 changed files with 6 additions and 0 deletions
|
@ -139,6 +139,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
|||
$type = $this->IsSupported('LOGINDISABLED') ? '' : 'LOGIN'; // RFC3501 6.2.3
|
||||
$types = [
|
||||
// if !$encrypted:
|
||||
// 'SCRAM-SHA-512' => 1,
|
||||
// 'SCRAM-SHA-256' => 1,
|
||||
// 'SCRAM-SHA-1' => 1,
|
||||
// if $encrypted:
|
||||
|
|
|
@ -111,8 +111,11 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
// $encrypted = !empty(\stream_get_meta_data($this->ConnectionResource())['crypto']);
|
||||
$type = '';
|
||||
$types = [
|
||||
// if !$encrypted:
|
||||
// 'SCRAM-SHA-512' => 1, // !$encrypted
|
||||
// 'SCRAM-SHA-256' => 1, // !$encrypted
|
||||
// 'SCRAM-SHA-1' => 1, // !$encrypted
|
||||
// if $encrypted:
|
||||
// 'CRAM-MD5' => 1, // $encrypted
|
||||
'OAUTHBEARER' => $aCredentials['UseAuthOAuth2IfSupported'],
|
||||
'XOAUTH2' => $aCredentials['UseAuthOAuth2IfSupported'],
|
||||
|
|
|
@ -126,6 +126,7 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
$type = '';
|
||||
$types = [
|
||||
// if !$encrypted:
|
||||
'SCRAM-SHA-512' => 1,
|
||||
'SCRAM-SHA-256' => 1,
|
||||
'SCRAM-SHA-1' => 1,
|
||||
// if $encrypted:
|
||||
|
|
|
@ -21,6 +21,7 @@ class Scram extends \SnappyMail\SASL
|
|||
function __construct(string $algo)
|
||||
{
|
||||
if (\stripos($algo, '-PLUS')) {
|
||||
// https://github.com/the-djmaze/snappymail/issues/182
|
||||
throw new \Exception("SASL SCRAM channel binding unsupported: {$algo}");
|
||||
}
|
||||
$algo = \str_replace('sha-', 'sha', \strtolower($algo));
|
||||
|
|
Loading…
Reference in a new issue