Conversation
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
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) { | ||
|
|
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) { | ||
|
|
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) { | ||
|
|
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.