From: yermej Date: 2010-08-08T09:30:11+09:00 Subject: Re: Looking for good Ruby OpenSSL TLS docs On Aug 7, 11:28 am, "Aaron D. Gifford" wrote: > Hi, > > I've got a custom TCP protocol that currently runs plaintext/cleartext > to which I want to add something akin to SMTP's STARTTLS.  The scripts > use Ruby's TCPSockets.  The protocol will for the most part remain > unencrypted, but when client or server requests that TLS begin, I need > to take the existing TCPSocket and initiate TLS over it. > > So...  any pointers to good Ruby OpenSSL docs?   Ruby's openssl is a very basic wrapper around the OpenSSL library and I haven't found much good documentation for either. I'd first look in the samples that come with the Ruby source code. In the source distribution, check out sample/openssl/echo_cli.rb and echo_svr.rb. The server uses a TCPSocket, but between the example and the TCPSocket code, it shouldn't be hard to work out what to do. Jeremy