mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
cc3531d288
commit
3a4facbf8d
3 changed files with 0 additions and 27 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue