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

Closed
efulet opened this Issue Aug 2, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@efulet

efulet commented Aug 2, 2012

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.

@efulet efulet closed this Sep 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment