Skip to content
Permalink
Browse files

Remove allowSelfSigned() method.

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

Refs #7496
  • Loading branch information...
markstory committed Oct 13, 2015
1 parent cc3531d commit 3a4facbf8d8ef211f876ab5261737c47a182e8aa
@@ -446,16 +446,4 @@ public function enableCrypto($type, $clientOrServer = 'client', $enable = true)
$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 @@ protected function _connect() {
$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 @@ public function testEnableCryptoEnableStatus() {
$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.
*

0 comments on commit 3a4facb

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