Boost logo

Boost Users :

From: Daniel Adolfsson (daniel.adolfsson_at_[hidden])
Date: 2007-05-18 13:27:36


Hello.

I'm trying to write a small FTP client using asio, and I'm having
trouble getting SSL/TLS working.

What I want to do is to connect to the FTP server normally, and send
"AUTH TLS" in cleartext to the server, and if successfull switch over
to SSL.

I have tried to use a ssl::stream to connect to the server, and while
not in SSL mode, using async_write() / async_read_until() with
stream_.next_layer().

This works fine, and everything is sent, but when the client enter SSL
mode, the server only receives junk from the client, while the client
receives good responses from the server.

I've checked and double checked- I am using stream_ while in SSL mode,
not stream_.next_layer().

So, async_read_until() seems to work with stream_ in SSL mode, but
async_write() doesn't.

Any ideas? Is there a better way to do this?

Daniel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net