Code = curl_easy_setopt (Ftp_handle, Curlopt_url, "ftp:127.0.0.1:990/"); code = curl_easy_setopt (Ftp_handle, CURLOPT_ USERNAME, "USERNAME"); code = curl_easy_setopt (Ftp_handle, Curlopt_password, "PASSWORD"); code = curl_easy_setopt (ftp_ Handle, Curlopt_dirlistonly, 1L); /*code = curl_easy_setopt (Ftp_handle, CURLOPT_FTP_SSL_CCC, curlftpssl_ccc_none); code = curl_easy_setopt (Ftp_handle, Curlopt_ssl_verifypeer, 1L); code = curl_easy_setopt (Ftp_handle, Curlopt_ssl_verifyhost, 2L); code = curl_easy_setopt ( Ftp_handle, Curlopt_ftpsslauth, curlftpauth_tls); code = curl_easy_setopt (Ftp_handle, Curlopt_sslversion, CURL_ SSLVERSION_TLSV1); *//*code = curl_easy_setopt (Ftp_handle, Curlopt_tlsauth_type, 1L); code = curl_easy_setopt (ftp_ Handle, Curlopt_tlsauth_username, "TMS"); code = curl_easy_setopt (Ftp_handle, Curlopt_tlsauth_password, "Ewstms"); */ *code = curl_easy_setopt (Ftp_handle, Curlopt_use_ssl, Curlusessl_all); */code = curl_easy_setopt (Ftp_handle, CURLOPT_ VERBOSE, 1L); Curlcode res = Curl_easy_perform (Ftp_handle);
The above code, will always be in the curl_easy_perform polling, nothing to do, wait until the timeout to jump out, do not know how to get
Although I'm sticking to the C + + code, I see PHP also uses Libcurl (CURL), so I'm going to hit the luck
Problem:
FTP Server mandatory SSL Authentication login,
The client's code, how should the options be set? (Curl_easy_setopt what should be set)
Can not find useful information on the Internet, if you happen to have done this, hope to give help, thank you
Reply to discussion (solution)
http://cgwxyz.blog.163.com/blog/static/2628060201202953249575/
http://www.web-development-blog.com/archives/tutorial-ftp-upload-via-curl/
http://bbs.csdn.net/topics/350170833
http://bbs.csdn.net/topics/350170833
Thank you
But none of this is SSL-certified.
If the FTP server is forcing SSL authentication to log in, this will not work.
Into:
Curl_easy_setopt (Ftp_handle, Curlopt_url, "ftps://192.168.1.63");
I was supposed to give up when I got off work yesterday.
But today still want to try, gradually follow up the source code, found not FTPS handle,
Instead of using the FTP handle, the guess is that the protocol is not written,
You can change it to the top.
But in fact, yesterday someone on the stack overflow gave me the answer, the company is not on the stack overflow, today knot paste just see, hehe