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

curl-and-php

Re: unable to set certificate file (wrong password?)

From: Naveed Memon <naveedmemon_at_gmail.com>
Date: Tue, 29 Nov 2005 15:26:50 -0500

You need an absolute path to your certificate file, try this:

$cert = realpath(".\key.pem"); # change this to the name and location of
your certificate file

realpath function in PHP gives you the absolute location to the file on your
server.

Hope this helps!!

Regards,
Naveed

On 11/29/05, Ross Chatfield <ivr_account_at_yahoo.com> wrote:
>
> Hi,
>
> I'm new to curl and I'm having problem with it.
> I have these codes:
> $host = "secure.linkpt.net";
> $port = 1129;
> $cert = ".\key.pem"; # change this to the name and location of your
> certificate file
>
> $hoststring = "https://".$host.":".$port."/LSGSXML";
>
> $ch = curl_init ();
> curl_setopt ($ch, CURLOPT_URL,$hoststring);
> curl_setopt ($ch, CURLOPT_POST, 1);
> curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml);
> curl_setopt ($ch, CURLOPT_SSLCERT, $cert);
> curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
>
> and got the error : unable to set certificate file (wrong password?)
>
> The .pem file has both the private key and the certifica! te.
>
> Any help will be appreciated.
>
> Thanks.
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>
>

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-11-29