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

Ado666's avatar

GuzzleHttp: handshake failure

Hello everybody,

I'm having some difficulties in setting up a simple login test with GuzzleHttp client on a REST call. I've looked around all over the net but unfortunately without success so i'm wondering if someone here could help.

Here's my code:

use GuzzleHttp\Client as HttpClient;

$response = Http::withOptions(['debug' => true,])
                  ->withHeaders([
                    'cert' => Storage::get('dss/mTLS.crt'),
                    'ssl_key' => Storage::get('dss/privateKey.pem'),
                    'Content-Type' => 'application/json;charset=utf-8',
                    'X-CSRF-TOKEN' => session()->token(),
                  ])
                  ->post('https://emea.api.hvca.globalsign.com:8443/v2/login', [
    'api_key' => env('DSS_API_KEY'),
    'api_secret' => env('DSS_API_SECRET'),
    'curl' => array(
        'CURLOPT_SSLVERSION' => 'CURL_SSLVERSION_TLSv1',
        'CURLOPT_SSL_CIPHER_LIST' => 'SSLv2',
        'CURLOPT_CAINFO' => '/etc/ssl/certs/ca-certificates.crt',
    ),

]);

dd($response);

As you can see it's a simple request, i tried v1, v2 & v3 for SSL version with the same results:

Debug results:

Trying 185.140.80.38... * TCP_NODELAY set * Connected to emea.api.hvca.globalsign.com (185.140.80.38) port 8443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure * Curl_http_done: called premature == 1 * stopped the pause stream! * Closing connection 0

Exception: Illuminate\Http\Client\ConnectionException cURL error 35: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Any help would be much appreciated :-)

Thanks in advance.

Cheers

0 likes
0 replies

Please or to participate in this conversation.