Skip to content

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

Closed
arnehormann wants to merge 1 commit intojruby:masterfrom
arnehormann:openssl-mpint
Closed

openssl: add handling for base 0 to new and to_s#1221
arnehormann wants to merge 1 commit intojruby:masterfrom
arnehormann:openssl-mpint

Conversation

@arnehormann
Copy link
Contributor

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 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

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 openssl-mpint branch November 18, 2013 09:38
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

Successfully merging this pull request may close these issues.

2 participants