Skip to content
Permalink
Browse files

Change names

  • Loading branch information...
Iandenh committed Oct 6, 2015
1 parent bb7e785 commit 5dfb780970867407e6e1b9dd0b829d23cd3c259d
@@ -413,7 +413,7 @@ public function enableCrypto($type, $clientOrServer = 'client', $enable = true)
* @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 @@ public function config($config = null) {
'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 @@ protected function _connect() {
$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 @@ public function testEnableCryptoEnableStatus() {
*/
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 @@ public function testConfigMerge() {
'password' => null,
'client' => null,
'tls' => false,
'selfSigned' => false
'ssl_allow_self_signed' => false
);
$this->assertEquals($expected, $this->CakeEmail->transportClass()->config());

0 comments on commit 5dfb780

Please sign in to comment.
You can’t perform that action at this time.