-
Notifications
You must be signed in to change notification settings - Fork 696
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
E2E: Invent support for E2E Profile 05. #589
Conversation
struct profile_config { | ||
profile_config() = delete; | ||
|
||
profile_config(uint32_t _data_id, size_t _offset, |
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.
Profile 05 does not require _min_data_length nor _max_data_length. Instead, it uses a fixed data length. The necessary parameters can be found here
|
||
void write_8(e2e_buffer &_buffer, uint8_t _data, size_t _index); | ||
void write_16(e2e_buffer &_buffer, uint16_t _data, size_t _index); | ||
void write_32(e2e_buffer &_buffer, uint32_t _data, size_t _index); |
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.
This method is not used anywhere, it can be removed
" (" << offset << ")"; | ||
offset /= 8; | ||
|
||
size_t min_data_length = read_value_from_config<size_t>(_config, |
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.
min_data_length and max_data_length are not parameters of profile 05, instead use just dataLength
} | ||
|
||
bool | ||
profile_05_checker::verify_input(const e2e_buffer &_buffer) const { |
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 verify_input method should be checking the fixed dataLength
} | ||
|
||
bool | ||
protector::verify_inputs(e2e_buffer &_buffer) { |
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 verify_input method should be checking the fixed dataLength
I added the requested changes. Please check and let me know if anything else needs to be fixed. Thanks. |
As requested under 1 I split the P05 from the PR and add the changes here to a new PR.
This PR adds support for the E2E Profile 05, that we added and tested in our project.
Please check to merge the changes or request changes if needed. Thanks.