-
Notifications
You must be signed in to change notification settings - Fork 20
feat: Support for SHA-384 Provisioning Certificates in rpc-go #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x.x
Are you sure you want to change the base?
feat: Support for SHA-384 Provisioning Certificates in rpc-go #1078
Conversation
138f7d3 to
356f4bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for SHA-384 hash algorithm for provisioning certificates in the rpc-go library, expanding beyond the previous SHA-256-only support. The implementation aligns the hash algorithm handling between certificate validation and AMT communication.
Key Changes:
- Updated hash algorithm interpretation to map value 3 to SHA-384 (48 bytes) and shifted SHA-512 to value 5
- Modified certificate hash generation to support both SHA-256 and SHA-384 based on certificate algorithm
- Enhanced certificate hash comparison to compute and match against multiple hash algorithms (SHA-256 and SHA-384)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/utils/helper.go | Updated InterpretHashAlgorithm to correctly map algorithm codes: 3→SHA-384, 5→SHA-512 |
| pkg/utils/helper_test.go | Updated test cases to reflect new hash algorithm mappings |
| internal/local/activate.go | Added SHA-384 hash generation in StartSecureHostBasedConfiguration and multi-algorithm fingerprint comparison in CompareCertHashes |
| internal/local/activate_test.go | Added comprehensive test coverage for SHA-256/SHA-384 certificate handling and hash comparison scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
356f4bb to
df40b95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Updated InterpretHashAlgorithm to handle SHA-384 (case 3) and SHA-512 (case 5) - Added SHA-384 support in StartSecureHostBasedConfiguration - Enhanced CompareCertHashes to compute and match both SHA-256 and SHA-384 fingerprints - Added test coverage for SHA-384 certificate handling Signed-off-by: Jena, Satyabrata <[email protected]>
df40b95 to
e5f6067
Compare
No description provided.