Wrap TrustAnchor array items in AsRef<T>
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reading the TrustAnchor uses in src/verify_cert.rs and src/end_entity.rs, then search the repository for other borrowed arrays of owned TrustAnchors. Check which callers require ownership versus only borrowed access; done means the applicable APIs accept reusable borrowed TrustAnchors without breaking existing owned callers.
Written by the indexing model from the issue text.
Description
There are some places that take a borrowed array of owned TrustAnchors e.g.,
E.g.,
https://github.com/rustls/webpki/blob/34e8f9ecc811ea678a3a7eef8db3a2974f4628bb/src/verify_cert.rs#L39
https://github.com/rustls/webpki/blob/2879b2ce7a476181ac3050f73fe0835f04728e86/src/end_entity.rs#L106
I believe the array sub-type can be wrapped in AsRef in many of these cases e.g.,
trust_anchors: &'p [AsRef<TrustAnchor<'_>>],
In some of the uses, the implementation doesn't seem to actually need ownership of the TrustAnchor and just reads from it a bit. Optionally accepting a borrowed reference should be helpful for cases e.g., where one or more of the TrustAnchors are cached and re-used.
- Dominant language
- Rust
- Stars
- 167
- Forks
- 112
- Avg merge
- 4h 28m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rustls/webpki
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
-
Path building re-parses every intermediate on each budgeted call (unbudgeted CPU cost)Possibly taken @batmnnn claimed this 23 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Improve error message when denying subject name due to wildcard in public suffixMay be free again @ctz claimed this 79 days ago, and no pull request is open. Open
-
Consider all candidate CRLsMay be free again @cpu claimed this 85 days ago, and no pull request is open. Open
-
Add opt-in support for ignoring URI name constraintsPossibly taken @djc claimed this 135 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Eyevinn/open-live-ingest#36 · 1 comment ·
Maintainers usually reply within 1 day
-
app
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug bug jury peripheral:i2s
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
esp-rs/esp-hal#6828 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
ライブラリを追加Openpriority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#13015 ·
Maintainers usually reply within 1 day