Thread: libcurl with ftps

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445

    libcurl with ftps

    I have searched for the last hour or so for information on connecting to an ftps server with a username and password and uploading a file with libcurl. I have found no examples that deal specifically with secure ftp, and only a few that deal with usernames and passwords.

    I was just wondering if there are any extra hoops I need to jump through to make my program properly authenticate with an ftps server versus a normal ftp server.

  2. #2
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    Without doing any research, I could only imagine that in the ftps spec it supports some type of data compression/encryption. So you would need to either write the code yourself or find a correctly licensed library that could be used for your application.

    Other than that, I can't imagine the protocol would be drastically different.

    edit: And by doing a little research (Wikipedia), ftps adds support for the TLS and SSL protocols.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by carrotcake1029 View Post
    Without doing any research, I could only imagine that in the ftps spec it supports some type of data compression/encryption. So you would need to either write the code yourself or find a correctly licensed library that could be used for your application.

    Other than that, I can't imagine the protocol would be drastically different.

    edit: And by doing a little research (Wikipedia), ftps adds support for the TLS and SSL protocols.
    you didn't address a single question that I asked. why did you even respond?

    thanks for nothing.

  4. #4
    Registered User Kudose's Avatar
    Join Date
    Jun 2006
    Posts
    92
    Quote Originally Posted by Elkvis View Post
    you didn't address a single question that I asked. why did you even respond?

    thanks for nothing.
    Just because he/she didn't spell it out for you doesn't mean he/she didn't point you in the right direction.
    IDE + Complier: Code::Blocks w/ GCC
    PC: AMD Phenom x4 2.2Ghz w/ 8G RAM
    OSes: CentOS 6.2 x64 & Win 7 Ultimate x64

  5. #5
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    Wow sorry, I didn't know you wanted someone to just lay it right in front of your eyes.

    From 5 minutes of searching, libcurl natively supports SSL certificates and there are actually open source projects that utilize this, like the following:
    Welcome to curl-loader

    Also, there are many example programs how to use a lot of these features. On the following page, there is an HTTP project which makes use of an SSL certificate, which should be fairly adaptable to FTP as long as your familiar with the protocol:
    libcurl - source code examples

    From looking around a little more, it looks like you may need to use openssl for your TLS/SSL needs.
    Last edited by carrotcake1029; 04-02-2010 at 09:22 PM.

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Kudose View Post
    Just because he/she didn't spell it out for you doesn't mean he/she didn't point you in the right direction.
    in what way was I pointed in the right direction? I asked specifically about using libcurl to access a secure ftp server. the answer that was given had nothing to do with libcurl, and went on about useless protocol information.

    For the record, I know how to talk to web and ftp servers with libcurl - a point which should have been implied or even self-evident from my post, but I have never done it with SSL or TLS enabled.

    I wasn't asking for anything to be "spelled out." I asked for people with experience in what I'm trying to do to offer some advice, and I got none. not only did I get no useful advice, I got useless ramblings about how the ftps spec probably implements some sort of encryption/compression. it was then suggested that I either write the code myself or find a properly licensed library.

    I ALREADY HAVE THAT LIBRARY AND SPELLED IT OUT PRETTY CLEARLY IN MY FIRST POST.

    if I were enough of a noob to take the first response as helpful advice, I would have been sent down many dead end roads, and would have spent many more hours of my time, and my employer's time, searching for something that is not relevant to my query.

    I also explained pretty clearly that I had already searched for examples of what I was trying to do, and to no avail.

    the simple fact that I did not post code should not instantly disqualify me from receiving useful help.

    so unless you have specific advice to offer, such as which options to set with curl_easy_setopt() to authenticate with a secure ftp server, please don't try to "help" anymore.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. libcurl experience and question
    By Dino in forum C Programming
    Replies: 6
    Last Post: 10-26-2009, 02:07 PM
  2. help with libcurl
    By ltcabral in forum C Programming
    Replies: 2
    Last Post: 03-27-2008, 01:05 PM
  3. libcURL POST items
    By Pete in forum Networking/Device Communication
    Replies: 2
    Last Post: 05-30-2007, 09:24 AM
  4. File Upload with libcurl
    By Tonto in forum Networking/Device Communication
    Replies: 4
    Last Post: 03-15-2006, 06:11 PM
  5. Problem with my libcurl attempt
    By kzar in forum C Programming
    Replies: 2
    Last Post: 05-21-2005, 01:28 PM