Skip to content

Conversation

@jena-satyabrata
Copy link
Contributor

No description provided.

@jena-satyabrata jena-satyabrata force-pushed the feat/issue971 branch 7 times, most recently from 138f7d3 to 356f4bb Compare December 30, 2025 06:42
@jena-satyabrata jena-satyabrata changed the title feat: Support for SHA-384 Provisioning Certificates in rpc-go. feat: Support for SHA-384 Provisioning Certificates in rpc-go Dec 30, 2025
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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]>
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.

1 participant