curl-users
Certificate verify failed
Date: Thu, 18 May 2006 03:12:08 -0700 (PDT)
Hi,
I am using GlabalSCAPE's Secure FTP Server. The code I am using is as given below:
string[] temp = new string[] {"C:\\testUpload.txt", "ftps://10.140.99.1/goodwill.com", "rlucas", "123123"};
args = temp;
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
FileStream fs = new FileStream(args[0], FileMode.Open,
FileAccess.Read, FileShare.Read);
Easy easy = new Easy();
Easy.ReadFunction rf = new Easy.ReadFunction(OnReadData);
easy.SetOpt(CURLoption.CURLOPT_READFUNCTION, rf);
easy.SetOpt(CURLoption.CURLOPT_READDATA, fs);
Easy.DebugFunction df = new Easy.DebugFunction(OnDebug);
easy.SetOpt(CURLoption.CURLOPT_DEBUGFUNCTION, df);
easy.SetOpt(CURLoption.CURLOPT_VERBOSE, true);
Easy.ProgressFunction pf = new Easy.ProgressFunction(OnProgress);
easy.SetOpt(CURLoption.CURLOPT_PROGRESSFUNCTION, pf);
easy.SetOpt(CURLoption.CURLOPT_URL, args[1]);
easy.SetOpt(CURLoption.CURLOPT_USERPWD,
args[2] + ":" + args[3]);
easy.SetOpt(CURLoption.CURLOPT_CAINFO, "C:\\ca-bundle.crt");
easy.SetOpt(CURLoption.CURLOPT_SSLVERSION, CURLsslVersion.CURL_SSLVERSION_SSLv3);
easy.SetOpt(CURLoption.CURLOPT_FTPSSLAUTH, CURLftpAuth.CURLFTPAUTH_SSL);
easy.SetOpt(CURLoption.CURLOPT_UPLOAD, true);
easy.SetOpt(CURLoption.CURLOPT_INFILESIZE, fs.Length);
easy.Perform();
Console.ReadLine();
easy.Cleanup();
fs.Close();
Curl.GlobalCleanup();
The output I see is :
Connected to 10.140.99.1
Successfully set certificate verify location:
cafile : C:\testUpload.txt
capath : none
some encrypted string.....
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify faile
d
Closing connection #0
I am fresher to ftps and libcurl and not able to solve the problem yet, can somebody help me to troubleshoot ?
thanks
Lucas.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2006-05-18