-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checking private key with an X509 cert fails with 0.14.2 #292
Labels
Comments
I ran into the same issue, I have a repro script that succeeds on mri and truffleruby and fails on jruby 9.4: #!/usr/bin/env ruby
require 'openssl'
ENV["MT_NO_PLUGINS"] = "1" # Work around autoloading of plugins
require 'minitest/autorun'
class T < Minitest::Test
make_my_diffs_pretty!
def test_round_trip
pem = "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEXsz3SZXFb8jMV42j6pJlyjbjR8K\nN3Bwocexq6LMIb5qsWKOQvLN16NUefLc4HswOoumRsVVaajSpQS6fobkRw==\n-----END PUBLIC KEY-----\n"
key = OpenSSL::PKey.read(pem)
assert_equal pem, key.to_pem
end
end |
thank you both - much appreciated. I dag in and found the cause to have happened in 0.14.1 |
kares
added a commit
that referenced
this issue
Apr 4, 2024
kares
added a commit
that referenced
this issue
Apr 4, 2024
kares
added a commit
that referenced
this issue
Apr 4, 2024
kares
added a commit
that referenced
this issue
Apr 4, 2024
kares
added a commit
that referenced
this issue
Apr 8, 2024
kares
added a commit
that referenced
this issue
Apr 8, 2024
kares
added a commit
that referenced
this issue
Apr 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to build a (signed) gem, but with JOpenSSL 0.14.2 the cert check fails during build. This works on JOpenSSL 0.12.2. I've narrowed it down to a consistently reproducible and minimal script, but I'm also fairly weak in OpenSSL and may be doing something wrong.
To reproduce the issue
gem cert
for this, for convenience, but the issue occurs even if I use theopenssl
CLI to generate this.(Have to use MRI ruby for this; trying to run this command with JRuby results in an error.)
Running with MRI 3.1.4:
Running with JRuby 9.2.21:
Running with JRuby 9.3.13:
Running with JRuby 9.4.5:
As seen in the output, JRuby 9.3.13 and 9.4.5 fail to check to the private key (returning
false
). MRI and JRuby 9.2.21 succeed (returningtrue
).Possibly relevant: if I get the public key from the private key and convert it to PEM, the resulting key is empty on JRuby 9.3.13 and 9.4.5:
The text was updated successfully, but these errors were encountered: