jruby / jruby-ossl

DEFUNCT, new repository at:
https://github.com/jruby/jruby-openssl
47 stars 19 forks source link

OpenSSL::X509::Certificate.new(string) raises Exception ArgumentError occured, wrong number of arguments (1 for 0) #24

Closed efulet closed 12 years ago

efulet commented 12 years ago

Hi,

I'm getting an argument error within a Rails (3.1.7) Application when I do this: .... cert = OpenSSL::X509::Certificate.new(File.read(cert_file)) ....

The error mesage is: wrong number of arguments (1 for 0)

But, the weird thing that the code works when I run it in an unit test: require 'openssl' require 'test/unit'

class TestCertificate < Test::Unit::TestCase .... def test_load_cert cert = OpenSSL::X509::Certificate.new(File.read(@cert_file)) assert_equal("Fri Aug 24 01:55:30 20011", cert.not_before.asctime) .... end end

I'm using JRuby v1.6.7.2 and jruby-openssl v0.7.7

Thanks.