-
Notifications
You must be signed in to change notification settings - Fork 130
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?