diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index 56c370494..7adff35bb 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -410,6 +410,7 @@ class CakeSocket { * 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 enableSelfSigned() { diff --git a/lib/Cake/Test/Case/Network/CakeSocketTest.php b/lib/Cake/Test/Case/Network/CakeSocketTest.php index 1d095e8da..91cc1f4d4 100644 --- a/lib/Cake/Test/Case/Network/CakeSocketTest.php +++ b/lib/Cake/Test/Case/Network/CakeSocketTest.php @@ -349,6 +349,18 @@ class CakeSocketTest extends CakeTestCase { $this->assertTrue($this->Socket->encrypted); } +/** + * testEnableCryptoSelfSigned + * + * @return void + */ + public function testEnableCryptoSelfSigned() { + $this->_connectSocketToSslTls(); + $this->assertTrue($this->Socket->enableSelfSigned()); + $this->assertTrue($this->Socket->enableCrypto('tls', 'client')); + $this->Socket->disconnect(); + } + /** * test getting the context for a socket. *