Forum: IronRuby uninitialized constant OpenSSL::Digest::SHA1

Posted by Craig Thompson (Guest)
on 2012-05-01 19:04
(Received via mailing list)
Trying to create a simple "hello world" application. So far I simply 
deleted the /public/index.html file and created a home controller. When 
I try to browse to the page, I get an uninitialized constant 
OpenSSL::Digest::SHA1 error. Couple of pieces of information. OS is 
Windows 7 and I am using the Visual Studio as my IDE. I've done some 
googleing, but I haven't been able to find any articles that describe 
the error I'm having. I've installed OpenSSL using a windows installer 
and I tried copying ssleay32.dll and libeay32.dll into the IronRuby bin 
folder, but that did not work. Seems like I must be missing something 
really basic.

Thanks,
Craig
Posted by Per Lundberg (Guest)
on 2012-05-01 23:07
(Received via mailing list)
Hi there,

It seems like you are using some kind of framework/web server - what 
would
that be?
Do you use Sinatra or how does is your Ruby web application structured?

Best regards,
Per
Posted by Will Green (hotgazpacho)
on 2012-05-02 04:33
(Received via mailing list)
OpenSSL in Ruby is implemented in a C Extension. Last I checked, 
IronRuby can't load C extensions.

I looked into doing a .NET port of OpenSSL for IronRuby, but quickly got 
lost in the .NET Crypto APIs. This was 2 years ago.

--
Will Green
will@hotgazpacho.org
Posted by Craig Thompson (Guest)
on 2012-05-02 14:38
(Received via mailing list)
Thanks for all the responses. The thing that baffling me is that 
IronRuby has an install that includes Visual Studio integration. So, it 
would seem that I should be able to get Hello World to work... I must 
have some specific "oddity" to my system that is hosing the 
IronRuby/Rails install.

Craig

----- Original Message -----

From: "Will Green" <will@hotgazpacho.org>
To: ironruby-core@rubyforge.org
Sent: Tuesday, May 1, 2012 10:32:54 PM
Subject: Re: [Ironruby-core] uninitialized constant 
OpenSSL::Digest::SHA1

OpenSSL in Ruby is implemented in a C Extension. Last I checked, 
IronRuby can't load C extensions.

I looked into doing a .NET port of OpenSSL for IronRuby, but quickly got 
lost in the .NET Crypto APIs. This was 2 years ago.

--
Will Green
will@hotgazpacho.org

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
Posted by Craig Thompson (Guest)
on 2012-05-07 21:12
(Received via mailing list)
Well, I got it to work... But I'm not sure why. In the ActiveSupport 
3.0.1 gem, I made a change to line 59 in the message_verifier.rb.

I changed it from:
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.const_get(@digest).new, @secret, 
data)
To:
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, 
data)

I have no idea why it worked. Only figured it out by hacking around in 
iirb.


----- Original Message -----

From: "Will Green" <will@hotgazpacho.org>
To: ironruby-core@rubyforge.org
Sent: Tuesday, May 1, 2012 10:32:54 PM
Subject: Re: [Ironruby-core] uninitialized constant 
OpenSSL::Digest::SHA1

OpenSSL in Ruby is implemented in a C Extension. Last I checked, 
IronRuby can't load C extensions.

I looked into doing a .NET port of OpenSSL for IronRuby, but quickly got 
lost in the .NET Crypto APIs. This was 2 years ago.

--
Will Green
will@hotgazpacho.org

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.