-
Notifications
You must be signed in to change notification settings - Fork 2
Service messages #73
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
Service messages #73
Conversation
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 implements CBOR marshalling and unmarshalling for DICE service messages, establishing the message format and serialization layer for NAT20 service communication. The implementation adds support for various DICE operations including CDI promotion, certificate issuance, and cryptographic signing through a well-defined API.
- Defines comprehensive message structures for all supported DICE operations
- Implements CBOR encoding/decoding with proper error handling and validation
- Provides extensive test coverage for round-trip serialization scenarios
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
include/nat20/service/messages.h |
Defines message structures and API for DICE service operations |
src/service/messages.c |
Implements CBOR marshalling/unmarshalling with validation logic |
src/service/messages.cddl |
CDDL specification documenting the CBOR message format |
src/service/test/messages.cpp |
Comprehensive test suite covering serialization round-trips and edge cases |
src/service/test/test.cpp |
Basic test runner for the service module |
include/nat20/error.h |
Adds new error codes for message parsing and validation |
CMakeLists.txt |
Integrates service library and tests into build system |
.github/license-check/license-config.json |
Adds license checking for CDDL files |
.github/license-check/header-apache2-semicolon.txt |
License header template for CDDL files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/service/test/test.cpp
Outdated
|
|
||
| int main(int argc, char *argv[]) { | ||
| ::testing::InitGoogleTest(&argc, argv); | ||
| std::cout << "Testing libnat20 service..." << std::endl; |
Copilot
AI
Sep 3, 2025
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.
The string 'libnat20' should be 'Libnat20' to match the project naming convention seen elsewhere in the codebase.
| std::cout << "Testing libnat20 service..." << std::endl; | |
| std::cout << "Testing Libnat20 service..." << std::endl; |
Implements marshalling and unmarshalling for DICE service messages using CBOR encoding.
Move certificate format enum to nat20/constants.h
96ca001 to
088e415
Compare
fb866a7 to
eeb91ba
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 9 out of 9 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/service/messages.c
Outdated
|
|
||
| n20_error_t n20_msg_promote_request_read(n20_istream_t *istream, | ||
| n20_msg_promote_request_t *request) { | ||
|
|
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.
missed this nit.
src/service/messages.c
Outdated
|
|
||
| n20_error_t n20_msg_issue_cdi_cert_request_read(n20_istream_t *istream, | ||
| n20_msg_issue_cdi_cert_request_t *request) { | ||
|
|
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.
missed this nit.
src/service/messages.c
Outdated
|
|
||
| n20_error_t n20_msg_issue_eca_ee_cert_request_read(n20_istream_t *istream, | ||
| n20_msg_issue_eca_ee_cert_request_t *request) { | ||
|
|
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.
missed this nit.
Enable annotations only in the library under test to avoid overwriting data with results from different tests.
LCOV of commit
|
Implements marshalling and unmarshalling for DICE service messages using
CBOR encoding.