cURL / Mailing Lists / curl-library / Single Mail

curl-library

Implicit SSL connection problem

From: <joseph.tilley_at_atxinc.com>
Date: Fri, 7 Jan 2005 13:02:53 -0500

Hello,

I have been able to develop a demo product that uses curl through C++ to
connect, upload and download files through a regular FTP server quite
well. I must say that CURL is a great product for this purpose.

I now have an ftp site that makes use of Implicit SSL. Through SmartFTP I
am able to verify that I can connect and communicate with that site, only
if Implicit SSL (at least as far as Smart FTP understands it) is enabled.

Below are the settings I am using to try to connect and get a directory
listing from this remote site. If I could get a little advice on what I
am missing, or doing wrong it would be greatly appreciated.

Some of these settings may be unnecessary for my purposes, I realize.

                curl_global_init(CURL_GLOBAL_ALL);
                m_pCurl = curl_easy_init();
                curl_easy_setopt(m_pCurl, CURLOPT_ERRORBUFFER,
m_szErrMsgLast);
                curl_easy_setopt(m_pCurl, CURLOPT_FTP_USE_EPSV, TRUE);
                curl_easy_setopt(m_pCurl, CURLOPT_FTP_SSL,
CURLFTPSSL_TRY);
                curl_easy_setopt(m_pCurl, CURLOPT_SSL_VERIFYPEER,FALSE);
                curl_easy_setopt(m_pCurl, CURLOPT_SSL_VERIFYHOST,FALSE);
                curl_easy_setopt(m_pCurl, CURLOPT_URL, szURLDirectory);
                curl_easy_setopt(m_pCurl, CURLOPT_VERBOSE, TRUE);
                curl_easy_setopt(m_pCurl, CURLOPT_WRITEFUNCTION,
CommFillBlobCallback);
                curl_easy_setopt(m_pCurl, CURLOPT_WRITEDATA, &bListing);
                curl_easy_setopt(m_pCurl, CURLOPT_FTPLISTONLY, TRUE);
                res = curl_easy_perform(m_pCurl);
                curl_easy_setopt(m_pCurl, CURLOPT_FTPLISTONLY, FALSE);

Also note that the string szURLDirectory is of the form:

ftp://user name:password@123.123.123.123:666/dir_name

The username does have a space in it, in case that matters. Should this
be escaped?

The output is:

        * About to connect() to 123.123.123.123 port 666
        * Connected to 123.123.123.123 (123.123.123.123) port 666

and then it hangs.

Cheers,
joe

Joe Tilley
E-File Senior Engineer
ATX II, LLC
Phone: (207) 498-4289 ext. 40728
Fax: (207) 498-6838
E-Mail: joseph.tilley_at_atxinc.com
Received on 2005-01-07