Getting started with SSL and Ruby

Guys,

I’d like to learn more about programming with SSL and Ruby, but the only
docs I’ve found so far are the API docs for the openssl lib, and they’re
unfortunately not much help. Could anyone offer suggestions or links
that
might get me started? I understand SSL from a conceptual level, but have
never tried to do it programatically.

Thanks!

Jake

On 2/1/07, Jake C. [email protected] wrote:

Guys,

I’d like to learn more about programming with SSL and Ruby, but the only
docs I’ve found so far are the API docs for the openssl lib, and they’re
unfortunately not much help. Could anyone offer suggestions or links that
might get me started? I understand SSL from a conceptual level, but have
never tried to do it programatically.

Have a look at webrick sources. It supports SSL so somewhere deep
inside you’ll find it :wink:

On Fri, Feb 02, 2007 at 02:50:24AM +0900, Jake C. wrote:

I’d like to learn more about programming with SSL and Ruby, but the only
docs I’ve found so far are the API docs for the openssl lib, and they’re
unfortunately not much help. Could anyone offer suggestions or links that
might get me started? I understand SSL from a conceptual level, but have
never tried to do it programatically.

There’s some example server-side code in ruby-ldapserver (on rubyforge),
and
probably lots of other things.

On 2/1/07, Brian C. [email protected] wrote:

There’s some example server-side code in ruby-ldapserver (on rubyforge),
and
probably lots of other things.

Brian,

Thanks…I’ll take a look. It appears you wrote this project, and i know
you
had to learn somewhere, so where did you start? Or had you done a lot of
openssl programming in another language to the point that the Ruby libs
made
sense?

Thanks!
Jake

On Fri, Feb 02, 2007 at 05:51:59AM +0900, Jake C. wrote:

Thanks…I’ll take a look. It appears you wrote this project, and i know you
had to learn somewhere, so where did you start? Or had you done a lot of
openssl programming in another language to the point that the Ruby libs made
sense?

I just dug around the openssl source in Ruby. On my Ubuntu system I
find:

/usr/share/doc/libopenssl-ruby1.8/examples/c_rehash.rb
/usr/share/doc/libopenssl-ruby1.8/examples/cert2text.rb
/usr/share/doc/libopenssl-ruby1.8/examples/cert_store_view.rb
/usr/share/doc/libopenssl-ruby1.8/examples/certstore.rb
/usr/share/doc/libopenssl-ruby1.8/examples/cipher.rb
/usr/share/doc/libopenssl-ruby1.8/examples/crlstore.rb
/usr/share/doc/libopenssl-ruby1.8/examples/echo_cli.rb
/usr/share/doc/libopenssl-ruby1.8/examples/echo_svr.rb
/usr/share/doc/libopenssl-ruby1.8/examples/gen_csr.rb
/usr/share/doc/libopenssl-ruby1.8/examples/smime_read.rb
/usr/share/doc/libopenssl-ruby1.8/examples/smime_write.rb
/usr/share/doc/libopenssl-ruby1.8/examples/wget.rb

echo_cli.rb and echo_svr.rb are good starting points.

HTH,

Brian.

On 2/1/07, Brian C. [email protected] wrote:

echo_cli.rb and echo_svr.rb are good starting points.

Brian,

That’s perfect! Thanks!

Jake