It returns RSA key which is not correct since the key is EC private key in PKCS8 PEM format.
Trying to use the key for TLS will cause the authentication to fail.
Here are the version I'm using, but it seems it behaves the same in previous version of jruby-openssl as well
[3] pry(main)> puts Gem.loaded_specs["jruby-openssl"].version
0.14.0
$ jruby --version
jruby 9.3.4.0 (2.6.8) 2022-03-23 eff48c1ebf OpenJDK 64-Bit Server VM 11.0.16+8 on 11.0.16+8 +jit [x86_64-linux]
I'm trying to read EC private key from a file:
It returns RSA key which is not correct since the key is EC private key in PKCS8 PEM format. Trying to use the key for TLS will cause the authentication to fail.
Here are the version I'm using, but it seems it behaves the same in previous version of jruby-openssl as well
Here is the example EC private key I used.
it has failed with other EC keys as well, so I do not think there is anything specific in this key.
With ruby-3.1.2 and ruby openssl-3.0.0