Bonjour à tous,

je suis en train de développer une interface utilisant une api externe.

Je peux faire plusieurs requêtes :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$curl        = curl_init();
        $url         = $this->url . 'catalog/System/Workflow/';
        $curlOptions = array(
            CURLOPT_URL           => $url,
            CURLOPT_CUSTOMREQUEST => "GET",
            CURLOPT_HTTPAUTH       => CURLAUTH_BASIC,
            CURLOPT_SSLVERSION     => 3,
            CURLOPT_SSL_VERIFYPEER => 0,
            CURLOPT_SSL_VERIFYHOST => 0,
            CURLOPT_USERPWD        => "$this->username:$this->password",
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_HEADER => true
        );
        curl_setopt_array($curl, $curlOptions + $this->curlOptDefaults);
        $content     = curl_exec($curl);
        if(curl_errno($curl) != 0)
        {
            echo "Error CURL : " . curl_error($curl);
            die('');
        }
        $tabWorkFlows = json_decode($content, true);
Et ça marche très bien. Je peux également faire du post, et ça marche très bien aussi.
Toutefois, quand je rajoute l'option

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
CURLOPT_HTTPHEADER     => 'Content-Type: application/xml'
il me renvoie toujours l'erreur :

SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Alors que je laisse les options ssl_verifypeer et ssl verifyhost à 0. Quelqu'un a déjà rencontré ce problème ?

Si vous avez besoin d'autres infos, n'hésitez pas à demander...