-
Notifications
You must be signed in to change notification settings - Fork 33
OpenSSL::PKey::PKeyError when using PEM private key #17
Copy link
Copy link
Open
Description
stack:
Ruby 2.7.0
rails 6.0.3.5
openssl 2.2.1
jose 1.1.3
While doing JOSE::JWK.from_pem_file(private_key) i got:
Could not parse PKey: no start line (OpenSSL::PKey::PKeyError)
error is in jose-1.1.3/lib/jose/jwk/pem.rb:6:
and trace:
3: from jose-1.1.3/lib/jose/jwk.rb:247:in `from_pem_file'
2: from jose-1.1.3/lib/jose/jwk.rb:237:in `from_pem'
1: from jose-1.1.3/lib/jose/jwk/pem.rb:6:in `from_binary'
The private key is OK, I have tested it using clients software and I can perfectly decrypt payloads. This error comes up only when using the gem on rails project.
Any sights on what can be happening? Any possible solution?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels