Description
I have an LDAP stub server implemented using ruby-ldapserver that I use in performance testing. It works with MRI Ruby but it fails under JRuby (I need to run it on a Solaris host where a suitable native Ruby is not available). The library uses OpenSSL to decode the ASN.1 data structures sent by clients.
I was unable to perform an LDAP bind with the server. I created https://github.com/inscitiv/ruby-ldapserver/issues/3 where I documented what I know so far. (Please ignore the first comments about how IntelliJ IDEA shows byte arrays in MRI Ruby vs. JRuby. That is a red herring.)
The first error message includes unable to decode object: org.bouncycastle.asn1.DERApplicationSpecific
.
@dividedmind suggested an addition to ASN1.decodeObject
method, but when I tried that I didn’t get much further. I think neither of us is confident we got it right. I am now stuck with the next IO#read
not returning and am not sure what to do.
I don’t know which ASN.1 data structures the LDAP bind message conveys so I am not sure what to fix. Any advice will be greatly appreciated.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9613040-jruby-openssl-does-not-decode-derapplicationspecific-objects?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136995&utm_medium=issues&utm_source=github).