reference/stream/functions/stream-socket-enable-crypto.xml
f39a3a7f3a686a4b0d09bab2250440ffe74ee097
...
...
@@ -9,11 +9,11 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>mixed</type><methodname>stream_socket_enable_crypto</methodname>
12
+
<type class="union"><type>int</type><type>bool</type></type><methodname>stream_socket_enable_crypto</methodname>
13
13
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
14
14
<methodparam><type>bool</type><parameter>enable</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>crypto_type</parameter></methodparam>
16
-
<methodparam choice="opt"><type>resource</type><parameter>session_stream</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>crypto_method</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>session_stream</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18

19
19
<simpara>
...
...
@@ -48,7 +48,7 @@
48
48
</listitem>
49
49
</varlistentry>
50
50
<varlistentry>
51
-
<term><parameter>crypto_type</parameter></term>
51
+
<term><parameter>crypto_method</parameter></term>
52
52
<listitem>
53
53
<para>
54
54
Setup encryption on the stream.
...
...
@@ -57,15 +57,25 @@
57
57
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv2_CLIENT</constant></simpara></listitem>
58
58
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv3_CLIENT</constant></simpara></listitem>
59
59
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv23_CLIENT</constant></simpara></listitem>
60
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_ANY_CLIENT</constant></simpara></listitem>
60
61
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLS_CLIENT</constant></simpara></listitem>
62
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT</constant></simpara></listitem>
63
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT</constant></simpara></listitem>
64
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT</constant></simpara></listitem>
65
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT</constant> (as of PHP 7.4.0)</simpara></listitem>
61
66
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv2_SERVER</constant></simpara></listitem>
62
67
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv3_SERVER</constant></simpara></listitem>
63
68
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_SSLv23_SERVER</constant></simpara></listitem>
69
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_ANY_SERVER</constant></simpara></listitem>
64
70
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLS_SERVER</constant></simpara></listitem>
71
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_0_SERVER</constant></simpara></listitem>
72
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_1_SERVER</constant></simpara></listitem>
73
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_2_SERVER</constant></simpara></listitem>
74
+
<listitem><simpara><constant>STREAM_CRYPTO_METHOD_TLSv1_3_SERVER</constant> (as of PHP 7.4.0)</simpara></listitem>
65
75
</itemizedlist>
66
76
</para>
67
77
<para>
68
-
If omitted, the <parameter>crypto_type</parameter> context option on
78
+
If omitted, the <literal>crypto_method</literal> context option on
69
79
the stream's SSL context will be used instead.
70
80
</para>
71
81
</listitem>
...
...
@@ -93,26 +103,24 @@
93
103

94
104
<refsect1 role="changelog">
95
105
&reftitle.changelog;
96
-
<para>
97
-
<informaltable>
98
-
<tgroup cols="2">
99
-
<thead>
100
-
<row>
101
-
<entry>&Version;</entry>
102
-
<entry>&Description;</entry>
103
-
</row>
104
-
</thead>
105
-
<tbody>
106
-
<row>
107
-
<entry>5.6.0</entry>
108
-
<entry>
109
-
The <parameter>crypto_type</parameter> is now optional.
110
-
</entry>
111
-
</row>
112
-
</tbody>
113
-
</tgroup>
114
-
</informaltable>
115
-
</para>
106
+
<informaltable>
107
+
<tgroup cols="2">
108
+
<thead>
109
+
<row>
110
+
<entry>&Version;</entry>
111
+
<entry>&Description;</entry>
112
+
</row>
113
+
</thead>
114
+
<tbody>
115
+
<row>
116
+
<entry>8.0.0</entry>
117
+
<entry>
118
+
<parameter>session_stream</parameter> is now nullable.
119
+
</entry>
120
+
</row>
121
+
</tbody>
122
+
</tgroup>
123
+
</informaltable>
116
124
</refsect1>
117
125
118
126
<refsect1 role="examples"><!-- {{{ -->
...
...
@@ -157,14 +165,13 @@ fclose($fp);
157
165
&reftitle.seealso;
158
166
<para>
159
167
<simplelist>
160
-
<member><xref linkend="ref.openssl" /></member>
161
-
<member><xref linkend="transports" /></member>
168
+
<member><xref linkend="ref.openssl"/></member>
169
+
<member><xref linkend="transports"/></member>
162
170
</simplelist>
163
171
</para>
164
172
</refsect1><!-- }}} -->
165
173

166
174
</refentry>
167
-

168
175
<!-- Keep this comment at the end of the file
169
176
Local variables:
170
177
mode: sgml
171
178