Support for all RFC5280 standard extensions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- rust
- Domain
- cryptography, security
Research direction
Start with ./rcgen/src/certificate.rs and review how CertificateParams, CustomExtension, and Attribute currently represent extensions. Use RFC5280 sections 4.2.1.4, 4.2.1.5, 4.2.1.7, 4.2.1.8, 4.2.1.11, 4.2.1.14, 4.2.1.15, 4.2.2.1, and 4.2.2.2 as the requirements. Done would mean the missing standard extensions have defined support rather than requiring custom encoding.
Written by the indexing model from the issue text.
Description
Hi,
first of all, thank you for this project.
Over the past few months, I have started writing and increasingly enjoying Rust. To be in full control of my PKI, develop a better understanding of the x.509 standard and hone my programming abilities, I set out do write a simple certificate management application that provides defaults that are to my liking, which is how I ended up here.
Going by ./rcgen/src/certificate.rs, not all extensions defined in RFC5280 are built-in to this library but instead, support for more extensions is provided via the CustomExtension and Attribute structs.
The missing standard extensions seem to be:
- 4.2.1.4. Certificate Policies
- 4.2.1.5. Policy Mappings
- 4.2.1.7. Issuer Alternative Name
- 4.2.1.8. Subject Directory Attributes
- 4.2.1.11. Policy Constraints
- 4.2.1.14. Inhibit anyPolicy
- 4.2.1.15. Freshest CRL (a.k.a. Delta CRL Distribution Point)
- 4.2.2.1. Authority Information Access
- 4.2.2.2. Subject Information Access
I think the ones that are not part of CertificateParams and not mentioned in the list above are automatically provided when signing but didn't confirm.
For now, I was looking to implement the Certificate Policies extension on my own but found myself unable to due to my missing experience in ASN.1 encoding (or encoding in general).
To be successful in implementing the extension(s) correctly, I'd like to ask for some guidance. If my Implementation is good enough, maybe I could re-contribute them to this project. Please don't expect too much though as I currently have little time to spare for these projects.
Best,
Gab
P.S.: While I'm already asking, I noticed that this Rust codebase as well as many other popular Rust projects seem to use few long over many short files which is the opposite of what I would usually do. For example, you decided to use one file for OIDs (oid.rs) and a 1496 line file (certificate.rs) for extensions and certificate parameters. I would usually have created an extensions module with one file per extension to keep the files short and easy to understand as well as avoid merge conflicts to the greatest extend possible. How come long files are the preferred way?
P.P.S.: Are there any resources besides RFC5280 that I am missing? Going by the IETF datatracker, it is still just a proposed standard but all implementations I know of reference 5280. Is there no actual, reliable standard around PKI?
- Dominant language
- Rust
- Stars
- 516
- Forks
- 160
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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/rcgen
-
Tighten up CertificateSigningRequestParams.from_der() sig AlgorithmIdentifier params validationOpennext-major-release
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
CertificateSigningRequestParams::from_der can parse the wrong key typePossibly taken @jgreeer claimed this 51 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/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