Skip to content

Commit 3a4facb

Browse files
committed
Remove allowSelfSigned() method.
This method is no longer needed as the low level socket understands the `ssl_*` options now. Refs #7496
1 parent cc3531d commit 3a4facb

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

lib/Cake/Network/CakeSocket.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,4 @@ public function enableCrypto($type, $clientOrServer = 'client', $enable = true)
446446
$this->setLastError(null, $errorMessage);
447447
throw new SocketException($errorMessage);
448448
}
449-
450-
/**
451-
* Accept Self-signed certificate on current stream socket
452-
*
453-
* @return bool True on success
454-
* @link http://php.net/manual/en/context.ssl.php About the 'allow_self_signed' option.
455-
* @see stream_context_set_option
456-
*/
457-
public function allowSelfSigned() {
458-
return stream_context_set_option($this->connection, 'ssl', 'allow_self_signed', true);
459-
}
460449
}
461-

lib/Cake/Network/Email/SmtpTransport.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ protected function _connect() {
169169
$this->_smtpSend("EHLO {$host}", '250');
170170
if ($this->_config['tls']) {
171171
$this->_smtpSend("STARTTLS", '220');
172-
if ($this->_config['ssl_allow_self_signed']) {
173-
$this->_socket->allowSelfSigned();
174-
}
175172
$this->_socket->enableCrypto('tls');
176173
$this->_smtpSend("EHLO {$host}", '250');
177174
}

lib/Cake/Test/Case/Network/CakeSocketTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -349,18 +349,6 @@ public function testEnableCryptoEnableStatus() {
349349
$this->assertTrue($this->Socket->encrypted);
350350
}
351351

352-
/**
353-
* testEnableCryptoSelfSigned
354-
*
355-
* @return void
356-
*/
357-
public function testEnableCryptoSelfSigned() {
358-
$this->_connectSocketToSslTls();
359-
$this->assertTrue($this->Socket->allowSelfSigned());
360-
$this->assertTrue($this->Socket->enableCrypto('tls', 'client'));
361-
$this->Socket->disconnect();
362-
}
363-
364352
/**
365353
* test getting the context for a socket.
366354
*

0 commit comments

Comments
 (0)