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

openssl: add handling for base 0 to new and to_s #1221

Closed
wants to merge 1 commit into from
Closed

openssl: add handling for base 0 to new and to_s #1221

wants to merge 1 commit into from

Conversation

@arnehormann
Copy link
Contributor

@arnehormann arnehormann commented Nov 13, 2013

In OpenSSL::BN, base 0 is used in to_s and new to convert to and from a multi precision integer as specified in RFC #4251 Section 5: mpint.
I stumbled over this while fixing a pull request for sshkey running under JRuby.
That's also what I used for testing - I ran rake test with the JRuby rake implementation for my first commit from the sshkey pull request.

@headius
Copy link
Member

@headius headius commented Nov 17, 2013

Thank you! Is there a test we could enable for this behavior?

@headius headius closed this Nov 17, 2013
@arnehormann
Copy link
Contributor Author

@arnehormann arnehormann commented Nov 17, 2013

I had to read the C documentation and experimented quite a lot with IRB to get this where it is now (and the MRI documentation is pretty much lacking in this regard). I would have attempted to write a test, but I didn't know where to put it.
I'll still try to write one, but when I do so, where do I put it and how do I enable it?
Would a new file test/test_openssl_stub_bn.rb load on its own?

@arnehormann arnehormann deleted the arnehormann:openssl-mpint branch Nov 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants