rustls / rustls/rcgen

Should key usages be tracked as a `HashSet` instead?

Open
#265 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In #264 code is pretty ugly because we're keeping track of whether an EKU already exists in the Vec that we hold. Should CertificateParams::key_usages and extended_key_usages be HashSet instead?

  • Does the order matter?
  • Is there a valid use case for having the same usage twice?

(I guess it could even be more like a bitset similar to what x509-parser apparently does.)

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 by reviewing the changes referenced in #264 and the CertificateParams::key_usages and extended_key_usages fields. Determine whether usage order or duplicates are meaningful, then compare the proposed HashSet and bitset representations. Done means reaching and documenting a representation decision with its API implications.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.