fix: cert generation returns parsed cert with valid Raw field#970
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #970 +/- ##
==========================================
+ Coverage 40.81% 41.40% +0.59%
==========================================
Files 134 134
Lines 12311 12319 +8
==========================================
+ Hits 5025 5101 +76
+ Misses 6763 6672 -91
- Partials 523 546 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6f02c34 to
a1ccb6e
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes certificate handling so generated certificates return parsed DER-backed structures and web server certificates can be restored from Vault for CIRA disk-based usage.
Changes:
- Returns parsed certificates from root and web server certificate generation.
- Adds Vault certificate load validation and malformed-cert cleanup path.
- Adds tests for parsed certificate
.Rawcontent and web server cert persistence.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
internal/certificates/generate.go |
Updates certificate store field constants, Vault load validation, parsed certificate returns, and disk persistence for web server certs. |
internal/certificates/generate_test.go |
Adds tests covering Vault loading, parsed certificate returns, and disk persistence behavior. |
sudhir-intc
approved these changes
May 14, 2026
3782fce to
162586b
Compare
a7681e6 to
f368bb5
Compare
* Return x509.ParseCertificate(certBytes) instead of &template * Persist web server cert files to disk when loading from Vault * Propagate saveCertAndKeyToFiles errors Related to device-management-toolkit/deployment#573
bb15136 to
86beee0
Compare
|
🎉 This PR is included in version 1.26.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to device-management-toolkit/deployment#573
Output:
After restart