Basic Constraints certificate extension
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 505
- Forks
- 157
- Avg merge
- 39m
- Merged PRs (30d)
- 1
Description
For Basic Constraints certificate extension currently rcgen support two options:
pub enum IsCa {
SelfSignedOnly,
Ca(BasicConstraints)
}
And if we look into spec we will see exactly these two options:
id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 }
BasicConstraints ::= SEQUENCE {
cA BOOLEAN DEFAULT FALSE,
pathLenConstraint INTEGER (0..MAX) OPTIONAL }
and extension identifies two aspects:
Subject type: is the certificate a CA certificate or it is an end entity certificate;
[Optionally] How many CAs are allowed in the chain below current CA certificate. This setting has no meaning for end entity certificates.
And for sure Ca(x) case generate something like:
SubjectType=CA
Path length Constraint = x
But in case of SelfSignedOnly it didn't generate anything.
Empty
Despite spec said: "If Basic Constraints extension is not included in certificate, it is automatically treated as end entity certificate."
Is it possible to force writing this field?
SubjectType=End Entity
Path length Constraint = None
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by locating the IsCa and BasicConstraints definitions and the certificate-extension encoding path, then compare how SelfSignedOnly and Ca(BasicConstraints) are represented. The work is done when SelfSignedOnly can explicitly encode the end-entity Basic Constraints result, with tests covering the generated extension and its absence or presence as appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100