Skip to content
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

Using ECDSA private key causes OpenSSL::PKey::RSAError #661

Open
bojan-drljaca-lu opened this issue Mar 14, 2023 · 3 comments
Open

Using ECDSA private key causes OpenSSL::PKey::RSAError #661

bojan-drljaca-lu opened this issue Mar 14, 2023 · 3 comments

Comments

@bojan-drljaca-lu
Copy link

Looks like only RSA private key type can be used since ECDSA private key is not supported and exception OpenSSL::PKey::RSAError is raised with error message Neither PUB key nor PRIV key: nested asn1 error. I'm trying to do SAML request signing and there is no option to change this and line of code that breaks in a gem is OpenSSL::PKey::RSA.new(formatted_private_key) in lib/onelogin/ruby-saml/settings.rb and method is get_sp_key. Is there a possibility to change this since OpenSSL library does support reading different key reference https://docs.ruby-lang.org/en/2.4.0/OpenSSL/PKey.html
The PKey module offers support for three popular public/private key algorithms:

  • RSA (OpenSSL::PKey::RSA)
  • DSA (OpenSSL::PKey::DSA)
  • Elliptic Curve Cryptography (OpenSSL::PKey::EC)
@johnnyshields
Copy link
Collaborator

johnnyshields commented Jul 7, 2024

@bojan-drljaca-lu This is now supported experimentally in #705. I'm still working on the test cases.

@johnnyshields
Copy link
Collaborator

@bojan-drljaca-lu please try my #705 branch its ready for testing.

@pitbulk
Copy link
Collaborator

pitbulk commented Jul 17, 2024

@bojan-drljaca-lu let us know how your test goes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants