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

Skip serialization of optional fields #381

Merged
merged 1 commit into from
May 23, 2022

Conversation

ansasaki
Copy link
Contributor

Add the #[serde(skip_serializing_if = "Option::is_none")] annotation to
all optional fields serialized using serde. This makes serde to skip
serializing optional fields when the value is None.

Fixes: #380

Signed-off-by: Anderson Toshiyuki Sasaki [email protected]

@ansasaki
Copy link
Contributor Author

@galmasi Hello, could you please check if this solves the issue #380?

@galmasi
Copy link

galmasi commented May 20, 2022

Confirming that @ansasaki's commit 6c0a0295b371da82159b916f118ef8e555aef9fe on the skip_optional branch performs correctly in the qemu-arm development system set up by Angelo Ruocco. That is, in a situation where there is no IMA log to be had, interaction between the rust agent and the keylime server is now correct.

Thanks again for the quick fix.

Add the #[serde(skip_serializing_if = "Option::is_none")] annotation to
all optional fields serialized using serde.  This makes serde to skip
serializing optional fields when the value is None.

Fixes: keylime#380

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@ansasaki ansasaki merged commit ceda2ec into keylime:master May 23, 2022
@ansasaki ansasaki deleted the skip_optional branch May 25, 2022 14:32
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.

keylime agent supplies malformed quote to verifier when there is no IMA log in the system
6 participants