Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.5
-
Fix Version/s: JRuby 1.7.1
-
Component/s: OpenSSL, Ruby 1.9.3
-
Labels:
-
Environment:Red Hat 5, jruby 1.6.5 (ruby 1.9 mode)
-
Number of attachments :
Description
I opened an issue on Github but wasn't sure which bug tracker is preferred, so I'm putting it here as well.
In Ruby (at least 1.9.x) the OpenSSL::X509::Certificate and OpenSSL::PKey::RSA constructors accept a File or String, such as:
OpenSSL::X509::Certificate.new File.open("/path/to/my.crt") OpenSSL::X509::Certificate.new File.read("/path/to/my.crt")
However, JRuby (at least 1.6.5 and 1.6.7) only accept a String:
OpenSSL::X509::Certificate.new File.open("/path/to/my.crt") #=> TypeError: can't convert File into String OpenSSL::X509::Certificate.new File.read("/path/to/my.crt") #=> this works
I believe the error created when passing a File to the OpenSSL::X509::Certificate constructor comes from X509Cert which in turn calls OpenSSLImpl. – the call to "arg.toconvertToString" seems to be the problem.
I believe the error created when passing a File to the OpenSSL::PKey::RSA constructor comes from here – the call to "arg.toconvertToString" seems to be the problem.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.7 [ 17049 ] | |
| Component/s | Ruby 1.9.3 [ 14661 ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.7.0.pre2 [ 18527 ] | |
| Fix Version/s | JRuby 1.7.0.pre1 [ 17049 ] |
Hiro Asari
made changes -
| Assignee | Hiroshi Nakamura [ nahi ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.7.0.RC1 [ 18717 ] | |
| Fix Version/s | JRuby 1.7.0.pre2 [ 18527 ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.7.1 [ 18842 ] | |
| Fix Version/s | JRuby 1.7.0.RC1 [ 18717 ] |
Charles Oliver Nutter
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Hiroshi Nakamura [ nahi ] | Charles Oliver Nutter [ headius ] |
| Resolution | Fixed [ 1 ] |