Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm modifying an application embedded FTP server I have previously written for a customer to support FTPS and while I have implicit mode working by passing a SecureServerSocket to the TCPSocketServer, I want to support Explicit mode where the connection start as a regular socket connection, and when receiving a AUTH TLS, switch the StreamSocket to a SecureStreamSocket and send a server hanshake.
I have attempted to use the attach method, but it seem to send a client hand shake rather than server one.
So then I tried to create a server context when creating the SecureStreamSocket, but get "GnuTLS error -19: An unexpected TLS handshake packet was received" when trying to connect from filezilla.
const Poco::Net::Context::Ptr ctx = new Poco::Net::Context(Poco::Net::Context::SERVER_USE, "", "", "", Poco::Net::Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
SecureStreamSocket *test = new SecureStreamSocket(ctx);
test->attach(socket());
Have anyone successfully transition a already established POCO TCPServer connection to Secure connection and if so, how did you do it - any hints would be helpfull.
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.