Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Support For Ruby 2.4.0 #127

Open
zhangjiha opened this issue Apr 27, 2018 · 2 comments
Open

Not Support For Ruby 2.4.0 #127

zhangjiha opened this issue Apr 27, 2018 · 2 comments

Comments

@zhangjiha
Copy link

zhangjiha commented Apr 27, 2018

When I run R509::Cert::Extensions::BasicConstraints.new(ca: false), raise Error
NoMethodError: undefined method value' for nil:NilClass from /Users/xxxxx/.rvm/gems/ruby-2.4.0/gems/r509-1.0.1/lib/r509/asn1.rb:20:in get_extension_payload'
from /Users/xxxxxx/.rvm/gems/ruby-2.4.0/gems/r509-1.0.1/lib/r509/cert/extensions/basic_constraints.rb:67:in parse_extension' from /Users/xxxxxx/.rvm/gems/ruby-2.4.0/gems/r509-1.0.1/lib/r509/cert/extensions/basic_constraints.rb:33:in initialize'
from (irb):14:in new' from (irb):14 from /Users/xxxxxx/.rvm/rubies/ruby-2.4.0/bin/irb:11:in

'

@zhangjiha
Copy link
Author

I change
OpenSSL::ASN1.decode(asn.entries.last.value).value
to
OpenSSL::ASN1.decode(asn.value.last.value).value
in asn1.rb, and it is OK.
I think the reason is that ruby 2.4.0 is not support entries by value instance value

@reaperhulk
Copy link
Member

If you can write a patch to support both Ruby 2.4 and older Ruby I will review it. Thank you for investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants