From: Michael Granger Date: 2010-12-12T05:35:46+09:00 Subject: Re: Using OpenSSL in Ruby On 12/10/10 4:51 PM, Aaron D. Gifford wrote: > Anyone have any pointers to documentation, notes, info, or if none of > that, code showing examples of using OpenSSL in Ruby, in particular > memory BIO input/output for SSL/TLS sessions? Searches turn up plenty > of C code, but dearth of Ruby code. I'd like to be able to establish > an SSL or TLS session using memory IO (no sockets, no file IO). There's nothing specifically about using memory IO, but the samples/openssl/ directory in the Ruby source has some good generic examples of how the pieces fit together. I've also found Eric Hodel's OpenSSL-related stuff to be a good source for how to use it, albeit with sockets and files, e.g.,: http://segment7.net/projects/ruby/QuickCert/ http://segment7.net/projects/ruby/drb/DRbSSL/ Looking at the openssl ext source, I don't see a way to create a raw memory source/sink, but OpenSSL::Session.new with a string creates one to hold the encoded session, so maybe it'd be easy to add that. To be honest, I'm not entirely sure what it means to "establish a[...] session using memory IO", so I could be entirely misguided. Good luck! -- Michael Granger Rubymage, Architect, Believer The FaerieMUD Consortium