mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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.
|
* @link http://php.net/manual/en/context.ssl.php About the 'allow_self_signed' option.
|
||||||
* @see stream_context_set_option
|
* @see stream_context_set_option
|
||||||
*/
|
*/
|
||||||
public function enableSelfSigned() {
|
public function allowSelfSigned() {
|
||||||
return stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true);
|
return stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ class SmtpTransport extends AbstractTransport {
|
||||||
'password' => null,
|
'password' => null,
|
||||||
'client' => null,
|
'client' => null,
|
||||||
'tls' => false,
|
'tls' => false,
|
||||||
'selfSigned' => false
|
'ssl_allow_self_signed' => false
|
||||||
);
|
);
|
||||||
$this->_config = array_merge($default, $this->_config, $config);
|
$this->_config = array_merge($default, $this->_config, $config);
|
||||||
return $this->_config;
|
return $this->_config;
|
||||||
|
@ -169,8 +169,8 @@ class SmtpTransport extends AbstractTransport {
|
||||||
$this->_smtpSend("EHLO {$host}", '250');
|
$this->_smtpSend("EHLO {$host}", '250');
|
||||||
if ($this->_config['tls']) {
|
if ($this->_config['tls']) {
|
||||||
$this->_smtpSend("STARTTLS", '220');
|
$this->_smtpSend("STARTTLS", '220');
|
||||||
if ($this->_config['selfSigned']) {
|
if ($this->_config['ssl_allow_self_signed']) {
|
||||||
$this->_socket->enableSelfSigned();
|
$this->_socket->allowSelfSigned();
|
||||||
}
|
}
|
||||||
$this->_socket->enableCrypto('tls');
|
$this->_socket->enableCrypto('tls');
|
||||||
$this->_smtpSend("EHLO {$host}", '250');
|
$this->_smtpSend("EHLO {$host}", '250');
|
||||||
|
|
|
@ -356,7 +356,7 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function testEnableCryptoSelfSigned() {
|
public function testEnableCryptoSelfSigned() {
|
||||||
$this->_connectSocketToSslTls();
|
$this->_connectSocketToSslTls();
|
||||||
$this->assertTrue($this->Socket->enableSelfSigned());
|
$this->assertTrue($this->Socket->allowSelfSigned());
|
||||||
$this->assertTrue($this->Socket->enableCrypto('tls', 'client'));
|
$this->assertTrue($this->Socket->enableCrypto('tls', 'client'));
|
||||||
$this->Socket->disconnect();
|
$this->Socket->disconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -947,7 +947,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
'password' => null,
|
'password' => null,
|
||||||
'client' => null,
|
'client' => null,
|
||||||
'tls' => false,
|
'tls' => false,
|
||||||
'selfSigned' => false
|
'ssl_allow_self_signed' => false
|
||||||
);
|
);
|
||||||
$this->assertEquals($expected, $this->CakeEmail->transportClass()->config());
|
$this->assertEquals($expected, $this->CakeEmail->transportClass()->config());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue