A connection is set to use SSL or TLS before 1.2

tx0/php:weak-tls-versiondefaulterrorsecurity/cryptodepth fastsecurity, cwe-327

What it finds

A connection is set to use SSL or TLS before 1.2

Example from the rule's tests
<?phpcurl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_0);tx0 reports: CURL_SSLVERSION_TLSv1_0 selects an outdated protocol versioncurl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);$ctx = stream_context_create(['ssl' => ['crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_CLIENT]]);tx0 reports: STREAM_CRYPTO_METHOD_SSLv3_CLIENT selects an outdated protocol version
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:

tx0.toml
[rules]
"tx0/php:weak-tls-version" = "off"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/php:weak-tls-version] reason="..."

tx0 explain tx0/php:weak-tls-version shows the same in the terminal. Found a false positive? Report it.