mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Change names
This commit is contained in:
parent
bb7e7850ae
commit
5dfb780970
4 changed files with 6 additions and 6 deletions
|
@ -413,7 +413,7 @@ class CakeSocket {
|
|||
* @link http://php.net/manual/en/context.ssl.php About the 'allow_self_signed' option.
|
||||
* @see stream_context_set_option
|
||||
*/
|
||||
public function enableSelfSigned() {
|
||||
public function allowSelfSigned() {
|
||||
return stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
'password' => null,
|
||||
'client' => null,
|
||||
'tls' => false,
|
||||
'selfSigned' => false
|
||||
'ssl_allow_self_signed' => false
|
||||
);
|
||||
$this->_config = array_merge($default, $this->_config, $config);
|
||||
return $this->_config;
|
||||
|
@ -169,8 +169,8 @@ class SmtpTransport extends AbstractTransport {
|
|||
$this->_smtpSend("EHLO {$host}", '250');
|
||||
if ($this->_config['tls']) {
|
||||
$this->_smtpSend("STARTTLS", '220');
|
||||
if ($this->_config['selfSigned']) {
|
||||
$this->_socket->enableSelfSigned();
|
||||
if ($this->_config['ssl_allow_self_signed']) {
|
||||
$this->_socket->allowSelfSigned();
|
||||
}
|
||||
$this->_socket->enableCrypto('tls');
|
||||
$this->_smtpSend("EHLO {$host}", '250');
|
||||
|
|
|
@ -356,7 +356,7 @@ class CakeSocketTest extends CakeTestCase {
|
|||
*/
|
||||
public function testEnableCryptoSelfSigned() {
|
||||
$this->_connectSocketToSslTls();
|
||||
$this->assertTrue($this->Socket->enableSelfSigned());
|
||||
$this->assertTrue($this->Socket->allowSelfSigned());
|
||||
$this->assertTrue($this->Socket->enableCrypto('tls', 'client'));
|
||||
$this->Socket->disconnect();
|
||||
}
|
||||
|
|
|
@ -947,7 +947,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
'password' => null,
|
||||
'client' => null,
|
||||
'tls' => false,
|
||||
'selfSigned' => false
|
||||
'ssl_allow_self_signed' => false
|
||||
);
|
||||
$this->assertEquals($expected, $this->CakeEmail->transportClass()->config());
|
||||
|
||||
|
|
Loading…
Reference in a new issue