Skip to content
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

audit: fixup log entry serialization #559

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

baloo
Copy link
Contributor

@baloo baloo commented Jul 19, 2024

When serializing response codes, in the case of an error, the payload would be serialized differently than what the device gives us.

In the case of a soft error, the response code should be serialized from the bottom up, and not from the midpoint like it was.
This was breaking the hash computation.

This introduces a new type for the purpose of audit log which represent the correct behavior. That fixes two cases I've observed: the log in the case of a reboot and the error in case an object would not exist.

When serializing a error, the audit logs are serialized from the bottom
up.

This introduces a new type wrapping the `response::Code` to fix that
behavior.
Previous behavior was breaking hashes of the audit log in the event of
an error.
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