Well, I got it working but had to make the declarations in CurlHandle.php

I added:

$curlOptions[CURLOPT_SSL_VERIFYPEER] = true;
$curlOptions[CURLOPT_CAINFO] = '/full/path/to/cacert.pem';

directly above:

curl_setopt_array($handle, $curlOptions);
return new static($handle, $curlOptions);
...

What's strange is that I also tried placing them in the default 
$curlOptions but those seemed to get dumped somewhere prior to 
curl_setopt_array()

Yucky, but working.


On Monday, February 9, 2015 at 7:05:34 PM UTC-4, Paul Halliday wrote:
>
> Hi,
>
> I am trying to get the configuration example from here to work:  
>
>
> http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_security.html#_guzzleconnection_self_signed_certificate
>
> My settings look like this:
>  
>  19 // Elasticsearch
>  20 $clientparams = array();
>  21 $clientparams['hosts'] = array(
>  22     'https://host01:443'
>  23 );
>  24 
>  25 $clientparams['guzzleOptions'] = array(
>  26     '\Guzzle\Http\Client::SSL_CERT_AUTHORITY' => 'system',
>  27     '\Guzzle\Http\Client::CURL_OPTIONS' => [
>  28        'CURLOPT_SSL_VERIFYPEER' => true,
>  29         'CURLOPT_SSL_VERIFYHOST' => 2,
>  30         'CURLOPT_CAINFO' => '.inc/cacert.pem',
>  31         'CURLOPT_SSLCERTTYPE' => 'PEM',
>  32     ]
>  33 );
>
> The error:
>
> PHP Fatal error:  Uncaught exception 
> 'Elasticsearch\\Common\\Exceptions\\TransportException' with message 'SSL 
> certificate problem: self signed certificate'
>
> What did I miss?
>
> Thanks!
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4dfff5aa-8040-44d5-af8e-5c2380c4ac55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to