@@ -460,6 +460,19 @@ $server = new Server('tls://127.0.0.1:8000', $loop, array(
460460));
461461```
462462
463+ By default, this server supports TLSv1.0+ and excludes support for legacy
464+ SSLv2/SSLv3. As of PHP 5.6+ you can also explicitly choose the TLS version you
465+ want to negotiate with the remote side:
466+
467+ ``` php
468+ $server = new Server('tls://127.0.0.1:8000', $loop, array(
469+ 'tls' => array(
470+ 'local_cert' => 'server.pem',
471+ 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_SERVER
472+ )
473+ ));
474+ ```
475+
463476> Note that available [ TLS context options] ( http://php.net/manual/en/context.ssl.php ) ,
464477 their defaults and effects of changing these may vary depending on your system
465478 and/or PHP version.
@@ -612,6 +625,18 @@ $server = new SecureServer($server, $loop, array(
612625));
613626```
614627
628+ By default, this server supports TLSv1.0+ and excludes support for legacy
629+ SSLv2/SSLv3. As of PHP 5.6+ you can also explicitly choose the TLS version you
630+ want to negotiate with the remote side:
631+
632+ ``` php
633+ $server = new TcpServer(8000, $loop);
634+ $server = new SecureServer($server, $loop, array(
635+ 'local_cert' => 'server.pem',
636+ 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_SERVER
637+ ));
638+ ```
639+
615640> Note that available [ TLS context options] ( http://php.net/manual/en/context.ssl.php ) ,
616641 their defaults and effects of changing these may vary depending on your system
617642and/or PHP version.
@@ -1000,6 +1025,18 @@ $connector->connect('tls://localhost:443')->then(function (ConnectionInterface $
10001025});
10011026```
10021027
1028+ By default, this connector supports TLSv1.0+ and excludes support for legacy
1029+ SSLv2/SSLv3. As of PHP 5.6+ you can also explicitly choose the TLS version you
1030+ want to negotiate with the remote side:
1031+
1032+ ``` php
1033+ $connector = new Connector($loop, array(
1034+ 'tls' => array(
1035+ 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
1036+ )
1037+ ));
1038+ ```
1039+
10031040> For more details about context options, please refer to the PHP documentation
10041041 about [ socket context options] ( http://php.net/manual/en/context.socket.php )
10051042 and [ SSL context options] ( http://php.net/manual/en/context.ssl.php ) .
@@ -1189,7 +1226,7 @@ $promise->cancel();
11891226```
11901227
11911228Calling ` cancel() ` on a pending promise will cancel the underlying TCP/IP
1192- connection and/or the SSL/TLS negonation and reject the resulting promise.
1229+ connection and/or the SSL/TLS negotiation and reject the resulting promise.
11931230
11941231You can optionally pass additional
11951232[ SSL context options] ( http://php.net/manual/en/context.ssl.php )
@@ -1202,6 +1239,16 @@ $secureConnector = new React\Socket\SecureConnector($dnsConnector, $loop, array(
12021239));
12031240```
12041241
1242+ By default, this connector supports TLSv1.0+ and excludes support for legacy
1243+ SSLv2/SSLv3. As of PHP 5.6+ you can also explicitly choose the TLS version you
1244+ want to negotiate with the remote side:
1245+
1246+ ``` php
1247+ $secureConnector = new React\Socket\SecureConnector($dnsConnector, $loop, array(
1248+ 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
1249+ ));
1250+ ```
1251+
12051252> Advanced usage: Internally, the ` SecureConnector ` relies on setting up the
12061253 required * context options* on the underlying stream resource.
12071254It should therefor be used with a ` TcpConnector ` somewhere in the connector
0 commit comments