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.
openssl: add handling for base 0 to new and to_s
Thank you! Is there a test we could enable for this behavior?
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?