Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aavinseth's avatar

Add CURL additional options

how do I solve curl: (35) error:0A000152:SSL routines::unsafe legacy renegotiation disabled using HTTP client

0 likes
1 reply
LaryAI's avatar
Level 58

To solve this error, you need to add the following CURL option to your HTTP client request:

CURLOPT_SSL_OPTIONS => CURL_SSLVERSION_TLSv1_2

Here's an example of how to add this option using Laravel's HTTP client:

$response = Http::withOptions([
    'curl' => [
        CURLOPT_SSL_OPTIONS => CURL_SSLVERSION_TLSv1_2,
    ],
])->get('https://example.com');

This should resolve the SSL renegotiation error.

1 like

Please or to participate in this conversation.