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

curl-and-php

multi certificate with curl ftp ssl

From: Nico <surf-nico_at_gemelos.fr>
Date: Tue, 19 Jan 2010 20:25:38 +0100

> Hello,
>
> i want to convert this function curl (work) :
>
> curl --ftp-ssl --capath /home/data/ --cert /home//data/certif.cer
            --cacert /home/data/societe.cer
> -u username:password ftp://ftpmachin.societe.net:21
>
> in php curl (v 7.18)
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
> curl_setopt($ch, CURLOPT_USE_SSL, CURLUSESSL_ALL );
> curl_setopt($ch, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL );
>>
> curl_setopt($ch, CURLOPT_SSLCERT, $certificat_dir.'certif.cer' );
> curl_setopt($ch, CURLOPT_CAPATH, $certificat_dir);
> curl_setopt($ch, CURLOPT_PORT, 21);
> curl_setopt($ch, CURLOPT_URL, 'ftp://ftpmachin.societe.net');
>>
> curl_setopt($ch, CURLOPT_USERPWD, "username:password");
> curl_setopt($ch, CURLOPT_FILE, $fp);
> curl_setopt($ch, CURLOPT_FTPASCII, false);
> $ret = curl_exec($ch);
> $info = curl_getinfo($ch);
> curl_close ($ch);
>
> but my php code don't work, error 530 user login false.
>
> i think the certificate are not be include correctly.
>
> Do you have an idea to right code for include the two certificate .
>
> thank you for help
>
> Gemelos
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2010-01-19