|
509 | 509 | </term>
|
510 | 510 | <listitem>
|
511 | 511 | <para>
|
512 |
| - Specifies the SSL or TLS protocol version to use with secure |
513 |
| - HTTP connections. Can be specified as |
514 |
| - <constant>SOAP_SSL_METHOD_TLS</constant>, |
515 |
| - <constant>SOAP_SSL_METHOD_SSLv2</constant>, |
516 |
| - <constant>SOAP_SSL_METHOD_SSLv3</constant>, or |
517 |
| - <constant>SOAP_SSL_METHOD_SSLv23</constant>. |
518 |
| - </para> |
519 |
| - <para> |
520 |
| - TODO advise use of 'crypto_method' in context instead |
| 512 | + Specifies the SSL or TLS protocol version to use with secure HTTP |
| 513 | + connections, instead of the default negotiation. |
| 514 | + Specifying <constant>SOAP_SSL_METHOD_SSLv2</constant> |
| 515 | + or <constant>SOAP_SSL_METHOD_SSLv3</constant> will force use of SSL 2 |
| 516 | + or SSL 3, respectively. |
| 517 | + Specifying <constant>SOAP_SSL_METHOD_SSLv23</constant> has no effect; |
| 518 | + the constant exists only for backwards compatibility. |
| 519 | + As of PHP 7.2, specifying <constant>SOAP_SSL_METHOD_TLS</constant> |
| 520 | + also has no effect; in earlier versions, it forced use of TLS 1.0. |
| 521 | + </para> |
| 522 | + <para> |
| 523 | + Note that SSL versions 2 and 3 are considered insecure, and may not |
| 524 | + be supported by the installed OpenSSL library. |
| 525 | + </para> |
| 526 | + <para> |
| 527 | + A more flexible alternative to this option, including specifying |
| 528 | + individual versions of TLS, is to use the ''context'' option with |
| 529 | + the ''crypto_method'' context parameter. |
| 530 | + <example> |
| 531 | + <title>Specifying use of TLS 1.3 only</title> |
| 532 | + <programlisting role="php"> |
| 533 | +<![CDATA[ |
| 534 | +<?php |
| 535 | +$context = stream_context_create([ |
| 536 | + 'ssl' => [ |
| 537 | + 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT |
| 538 | + ] |
| 539 | +]; |
| 540 | +$client = new SoapClient("some.wsdl", ['context' => $context]); |
| 541 | +]]> |
| 542 | + </programlisting> |
| 543 | + </example> |
521 | 544 | </para>
|
522 | 545 | </listitem>
|
523 | 546 | </varlistentry>
|
|
0 commit comments