Remove allowSelfSigned() method.

This method is no longer needed as the low level socket understands the
`ssl_*` options now.

Refs #7496
This commit is contained in:
mark_story 2015-10-12 21:58:24 -04:00
parent cc3531d288
commit 3a4facbf8d
3 changed files with 0 additions and 27 deletions

View file

@ -446,16 +446,4 @@ class CakeSocket {
$this->setLastError(null, $errorMessage);
throw new SocketException($errorMessage);
}
/**
* Accept Self-signed certificate on current stream socket
*
* @return bool True on success
* @link http://php.net/manual/en/context.ssl.php About the 'allow_self_signed' option.
* @see stream_context_set_option
*/
public function allowSelfSigned() {
return stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true);
}
}

View file

@ -169,9 +169,6 @@ class SmtpTransport extends AbstractTransport {
$this->_smtpSend("EHLO {$host}", '250');
if ($this->_config['tls']) {
$this->_smtpSend("STARTTLS", '220');
if ($this->_config['ssl_allow_self_signed']) {
$this->_socket->allowSelfSigned();
}
$this->_socket->enableCrypto('tls');
$this->_smtpSend("EHLO {$host}", '250');
}

View file

@ -349,18 +349,6 @@ class CakeSocketTest extends CakeTestCase {
$this->assertTrue($this->Socket->encrypted);
}
/**
* testEnableCryptoSelfSigned
*
* @return void
*/
public function testEnableCryptoSelfSigned() {
$this->_connectSocketToSslTls();
$this->assertTrue($this->Socket->allowSelfSigned());
$this->assertTrue($this->Socket->enableCrypto('tls', 'client'));
$this->Socket->disconnect();
}
/**
* test getting the context for a socket.
*