#91 ✓invalid
Peter Suschlik

OpenSSL::Digest::SHA256 fails with thin when thin loaded before openssl

Reported by Peter Suschlik | December 23rd, 2008 @ 09:17 AM | in Future

When thin is loaded before openssl then OpenSSL::Digest::SHA256 won't work.

How to reproduce


require 'rubygems'
require 'thin'
require 'openssl'
p OpenSSL::Digest::SHA256.digest("hello wolrd") # will fail

Workaround

Load openssl before thin (e.g. bin/thin)


require 'rubygems'
require 'openssl'
require 'thin'
p OpenSSL::Digest::SHA256.digest("hello wolrd") # SUCCESS!

Any thoughts? I could provide some straces if needed

Kind regards Peter

Comments and changes to this ticket

  • macournoyer

    macournoyer December 23rd, 2008 @ 10:24 AM

    Hey Peter,

    Can you provide more info about the failure, eg.: backtrace, error message, etc..

  • Peter Suschlik

    Peter Suschlik December 23rd, 2008 @ 10:29 AM

    Sure :)

    
    require 'rubygems'
    require 'thin'
    require 'openssl'
    
    p OpenSSL::Digest::SHA256.digest("hello world")
    
    
    $ /opt/ruby-enterprise-1.8.6-20081205/bin/ruby with_thin.rb
    /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/1.8/openssl/digest.rb:41:in `initialize': Unsupported digest algorithm (SHA256). (RuntimeErro)
            from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/1.8/openssl/digest.rb:41:in `digest'
            from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/1.8/openssl/digest.rb:41:in `digest'
            from with_thin.rb:5
    
    
  • Peter Suschlik

    Peter Suschlik December 23rd, 2008 @ 10:42 AM

    Okay, I found it.

    It wasn't thin fault at all - sorry for that :(

    rubyeventmachine.so was linked to an old libssl (0.9.7f) instead of (0.9.8). (ldd did the trick)

    So you can close this ticket.

    Again, sorry for blaming thin and thank you for great work! :)

    Kind regards

    Peter

  • macournoyer

    macournoyer March 16th, 2009 @ 08:56 PM

    • State changed from “new” to “invalid”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Tags

Pages