Ask FTP over SSL with Libcurl

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.