Aaron D. Gifford wrote in post #968472:
> For example, I have two Ruby objects that communicate over a
> bidirectional memory FIFO pipe.  For reasons I don't care to explain,
> I would like to initiate an SSL/TLS session over that pipe, but I need
> to handle all I/O directly since I will be muxing/demuxing the SSL/TLS
> traffic with other unencrypted traffic over the single channel.  The
> ability to start and stop arbitrary numbers of SSL/TLS encrypted
> streams at will is desirable.
>
> If anyone thinks of any more, please post them.  :)

You could create a SocketPair, and demux the TLS stuff into that. You 
would need to beware of it blocking, so perhaps run the TLS stuff in a 
separate thread.

http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/26d3538da0410b8b/fdc3c5c6686ceb49?lnk=gst&q=Socket.pair&rnum=2&hl=en#fdc3c5c6686ceb49

For regular TLS using a socket, ruby openssl is pretty simple. There's 
code in ruby-ldapserver which does it.

-- 
Posted via http://www.ruby-forum.com/.