TLS stream wrapper on existing socket

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I implement a proprietary protocol, which consists of cleartext
messages (much like FTP) and has a TLS mode, which will be initiated by
a "AUTH TLS" command (also, like for FTP). After send AUTH TLS, the
whole TLS negotiation starts and the following communication will be
wrapped in TLS.

Instead of implementing TLS by myself, I would like to use the stream

But how? Something like fopen("tls://...") does not help me here. A
stream filter for tls (instead of a wrapper) would be perfect for this
purpose, but it does not exist. Or something like freopen().

Any hint?

Best Regards,

Site Timeline