Change names

This commit is contained in:
Ian den Hartog 2015-10-06 10:10:34 +02:00
parent bb7e7850ae
commit 5dfb780970
4 changed files with 6 additions and 6 deletions

View file

@ -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);
}
}

View file

@ -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');

View file

@ -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();
}

View file

@ -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());