cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: integrating CURL in PHP with certificates (fwd)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 9 Jan 2002 20:14:08 +0100 (MET)

This is forwarded back to the curl and php list. Please don't address me
personally with curl matters.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
---------- Forwarded message ----------
Date: Wed, 9 Jan 2002 18:38:21 -0000
From: Hugo Alexandre A. S. Dias <hugo_at_mni.pt>
To: Daniel Stenberg <daniel_at_haxx.se>
Subject: Re: integrating CURL in PHP with certificates
Daniel,
I tryed to implement this solution, but it keeps me telling that the client
certificate is requiered:
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSLCERT, "..\\..\\certificados\\multicert.pem");
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, "3I3I37RP52G1L15D8T8S");
curl_setopt($ch, CURLOPT_CAINFO,"..\\..\\certificados\\chain.cer");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2);
These are the OPTS i'm using.
This is PHP 4.0.8 in IIS5.0
Hugo Alexandre Dias
Web-Programmer
MNI - Médicos na Internet
E-mail: hugo_at_mni.pt
ICQ # 7995052
MSN: anikin_jedi_at_hotmail.com
http://www.mni.pt
http://www.saudenainternet.pt
http://www.listamedica.com
http://medicos24.siconline.pt
MNI - Um Mundo de Médicos
----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
To: "Hugo Alexandre A. S. Dias" <hugo_at_mni.pt>
Cc: "curl and php list" <curl-and-php_at_lists.sourceforge.net>
Sent: Wednesday, December 19, 2001 12:52 PM
Subject: Re: integrating CURL in PHP with certificates
> On Tue, 18 Dec 2001, Hugo Alexandre A. S. Dias wrote:
>
> > My problem is that i need to give CURL the --cacert param.
> >
> > Can anyone tell me what's the same option in curl_setopt?
>
> The curl command line tool uses these options when --cacert is set:
>
>   curl_easy_setopt(curl, CURLOPT_CAINFO, cacert_ptr);
>   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, TRUE);
>   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
>
> --
>     Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
>
>
>
>
Received on 2002-01-09