rustls / rustls/rcgen

`cert::KeyPairAlgorithm` is not public

Open
#309 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
505
Forks
157
Avg merge
39m
Merged PRs (30d)
1

Description

When using rustls_cert_gen as a library, the CertificateBuilder::signature_algorithm function takes KeyPairAlgorithm as an argument, however the cert module is private, and cert::KeyPairAlgorithm is not exported. This means that CertificateBuilder::signature_algorithm cannot be used (or only used with Default::default(), the same as not using it).

Happy to open a PR to expose this (there might be other params missing too), just wanted to check if it was intentional.

Contributor guide

No contributing guide indexed for this repository

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 at the public CertificateBuilder::signature_algorithm entry point and trace the private cert module's exports to see how KeyPairAlgorithm is defined and exposed. Done means a library user can supply a KeyPairAlgorithm to signature_algorithm rather than being limited to Default::default(); check for any existing API tests covering this path.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.