problem using oauth gem with jruby-openssl #1

Closed
bilic opened this Issue Oct 6, 2009 · 2 comments

Comments

Projects
None yet
2 participants

bilic commented Oct 6, 2009

The unit tests in test_rsa_sha1.rb for the oauth-0.3.6 gem fail when using jruby-openssl-0.5.2. This is traced down to the fact that

OpenSSL::PKey::RSA.new(IO.read(File.dirname(FILE) + "/keys/rsa.pem")

fails in an exception “Neither PUB key nor PRIV key” when the pem file’s contents is as below. Note that I tested that the pem file is OK since running (in cygwin)
openssl rsa -in rsa.pem -check -noout
outputs
RSA key ok

Any assistance would be greatly appreciated.

-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALRiMLAh9iimur8V
A7qVvdqxevEuUkW4K+2KdMXmnQbG9Aa7k7eBjK1S+0LYmVjPKlJGNXHDGuy5Fw/d
7rjVJ0BLB+ubPK8iA/Tw3hLQgXMRRGRXXCn8ikfuQfjUS1uZSatdLB81mydBETlJ
hI6GH4twrbDJCR2Bwy/XWXgqgGRzAgMBAAECgYBYWVtleUzavkbrPjy0T5FMou8H
X9u2AC2ry8vD/l7cqedtwMPp9k7TubgNFo+NGvKsl2ynyprOZR1xjQ7WgrgVB+mm
uScOM/5HVceFuGRDhYTCObE+y1kxRloNYXnx3ei1zbeYLPCHdhxRYW7T0qcynNmw
rn05/KO2RLjgQNalsQJBANeA3Q4Nugqy4QBUCEC09SqylT2K9FrrItqL2QKc9v0Z
zO2uwllCbg0dwpVuYPYXYvikNHHg+aCWF+VXsb9rpPsCQQDWR9TT4ORdzoj+Nccn
qkMsDmzt0EfNaAOwHOmVJ2RVBspPcxt5iN4HI7HNeG6U5YsFBb+/GZbgfBT3kpNG
WPTpAkBI+gFhjfJvRw38n3g/+UeAkwMI2TJQS4n8+hid0uus3/zOjDySH3XHCUno
cn1xOJAyZODBo47E+67R4jV1/gzbAkEAklJaspRPXP877NssM5nAZMU0/O/NGCZ+
3jPgDUno6WbJn5cqm8MqWhW1xGkImgRk+fkDBquiq4gPiT898jusgQJAd5Zrr6Q8
AO/0isr/3aa6O6NLQxISLKcPDk2NOccAfS/xOtfOz4sJYM3+Bs4Io9+dZGSDCA54
Lw03eHTNQghS0A==
-----END PRIVATE KEY-----

Member

nahi commented Jan 4, 2010

We recognized this as a bug. Please track this issue at http://jira.codehaus.org/browse/JRUBY-4333 though it's not yet resolved.

Member

nahi commented Jan 7, 2010

Fixed in master:ab2b44ce862c954af5dae2df1a344a2d0341d244

This issue was closed.

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