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 · 0 comments
Open

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

bojan-drljaca-lu opened this issue Mar 14, 2023 · 0 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)
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

No branches or pull requests

1 participant