Skip to content

Add support for is_ca in CSR Params#420

Merged
djc merged 3 commits into
rustls:mainfrom
5Dev24:csr-params-is-ca
Mar 27, 2026
Merged

Add support for is_ca in CSR Params#420
djc merged 3 commits into
rustls:mainfrom
5Dev24:csr-params-is-ca

Conversation

@5Dev24

@5Dev24 5Dev24 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Add in support for Basic Constraints in CSR Params parsing from DER.

Split out the logic used in IsCa::from_x509 so we can use the same logic when parsing.

Done as some CSRs contain basic constraints and CertificateSigningRequestParams::from_{pem,der} fails to parse them.

@cpu

cpu commented Mar 23, 2026

Copy link
Copy Markdown
Member

I think this needs test coverage before it could be reviewed for merge.

@5Dev24

5Dev24 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor Author

Added in some test cases. Was a bit unsure on location / method since we can't serialize basic constraints currently. Made the csr test cases with openssl and documented the commands used

Comment thread rcgen/src/certificate.rs Outdated
Comment thread rcgen/src/certificate.rs
Comment thread rcgen/src/csr.rs Outdated
Comment thread verify-tests/src/lib.rs Outdated
5Dev24 added 3 commits March 25, 2026 08:17
Reuse in IsCa's x509 constructor
Update CSR Params from_der documentation to reference Basic Constraints support
@5Dev24 5Dev24 force-pushed the csr-params-is-ca branch from 7d0c62a to 2e474ae Compare March 25, 2026 12:23

@djc djc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

@djc djc added this pull request to the merge queue Mar 27, 2026
Merged via the queue into rustls:main with commit 4909041 Mar 27, 2026
17 checks passed
@djc djc mentioned this pull request May 10, 2026
eleboucher pushed a commit to eleboucher/towonel that referenced this pull request May 11, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rcgen](https://github.com/rustls/rcgen) | workspace.dependencies | patch | `0.14.7` → `0.14.8` |

---

### Release Notes

<details>
<summary>rustls/rcgen (rcgen)</summary>

### [`v0.14.8`](https://github.com/rustls/rcgen/releases/tag/v0.14.8): 0.14.8

[Compare Source](rustls/rcgen@v0.14.7...v0.14.8)

#### What's Changed

- Fix incorrect identifier for ML-DSA signature algorithms by [@&#8203;DarkmatterVale](https://github.com/DarkmatterVale) in [#&#8203;412](rustls/rcgen#412)
- Upgrade yasna to 0.6 by [@&#8203;djc](https://github.com/djc) in [#&#8203;419](rustls/rcgen#419)
- Add support for is\_ca in CSR Params by [@&#8203;5Dev24](https://github.com/5Dev24) in [#&#8203;420](rustls/rcgen#420)
- Add support for serializing BasicConstraints in CSR's by [@&#8203;5Dev24](https://github.com/5Dev24) in [#&#8203;422](rustls/rcgen#422)
- update key\_pair to signing\_key in README.md by [@&#8203;fakelozic](https://github.com/fakelozic) in [#&#8203;427](rustls/rcgen#427)
- Fix encoding of directoryName constraints by [@&#8203;sfackler](https://github.com/sfackler) in [#&#8203;429](rustls/rcgen#429)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/towonel/pulls/37
eleboucher pushed a commit to eleboucher/towonel that referenced this pull request May 20, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rcgen](https://github.com/rustls/rcgen) | workspace.dependencies | patch | `0.14.7` → `0.14.8` |

---

### Release Notes

<details>
<summary>rustls/rcgen (rcgen)</summary>

### [`v0.14.8`](https://github.com/rustls/rcgen/releases/tag/v0.14.8): 0.14.8

[Compare Source](rustls/rcgen@v0.14.7...v0.14.8)

#### What's Changed

- Fix incorrect identifier for ML-DSA signature algorithms by [@&#8203;DarkmatterVale](https://github.com/DarkmatterVale) in [#&#8203;412](rustls/rcgen#412)
- Upgrade yasna to 0.6 by [@&#8203;djc](https://github.com/djc) in [#&#8203;419](rustls/rcgen#419)
- Add support for is\_ca in CSR Params by [@&#8203;5Dev24](https://github.com/5Dev24) in [#&#8203;420](rustls/rcgen#420)
- Add support for serializing BasicConstraints in CSR's by [@&#8203;5Dev24](https://github.com/5Dev24) in [#&#8203;422](rustls/rcgen#422)
- update key\_pair to signing\_key in README.md by [@&#8203;fakelozic](https://github.com/fakelozic) in [#&#8203;427](rustls/rcgen#427)
- Fix encoding of directoryName constraints by [@&#8203;sfackler](https://github.com/sfackler) in [#&#8203;429](rustls/rcgen#429)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/towonel/pulls/37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants