ruby / ruby/openssl

OpenSSL::PKey::PKey subclass for EVP_PKEY_RSA_PSS

Open
#715 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
276
Forks
200
Avg merge
1d 19h
Merged PRs (30d)
7

Description

I had the same problem, see https://github.com/ruby/openssl/issues/562, to open a key and got the error OpenSSL::PKey::RSAError: incorrect pkey type: RSASSA-PSS.
So I used the mentioned method and called OpenSSL::PKey.read.
But now I have a problem to sign a JWT with the algorithm RSASSA-PSS:

JWT.encode({}, key, "ps256")
# This returns:
# NoMethodError: undefined method `sign_pss' for #<OpenSSL::PKey::PKey oid=RSASSA-PSS>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with OpenSSL::PKey.read and the sign_pss call shown in the report, then review linked issue #562 for the existing key-loading context. Done means an EVP_PKEY_RSA_PSS key can be represented by an OpenSSL::PKey::PKey subclass and used by JWT.encode with PS256 without the reported NoMethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cryptography
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.