Passing client certificates through Curl request using Guzzle Passing client certificates through Curl request using Guzzle curl curl

Passing client certificates through Curl request using Guzzle


You can use ssl_key and cert:

$response = $client->post(    $endpoint, [        'json' => $content,        'headers' => $headers,        'connect_timeout' => 650,        // add these        'cert' => '/path/to/openyes.crt.pem',        'ssl_key' => '/path/to/openyes.key.pem'    ]);

if they have a pass phrase, you can set them like this:

        'cert' => ['/path/to/openyes.crt.pem', 'password'],        'ssl_key' => ['/path/to/openyes.key.pem', 'password']