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

Add marshaling/unmarshaling methods for types that support it #291

Open
5 tasks
ionut-arm opened this issue Nov 17, 2021 · 1 comment
Open
5 tasks

Add marshaling/unmarshaling methods for types that support it #291

ionut-arm opened this issue Nov 17, 2021 · 1 comment
Labels
enhancement New feature or request medium Effort label

Comments

@ionut-arm
Copy link
Member

ionut-arm commented Nov 17, 2021

As mentioned here and here, it would be useful to have types on the interface of, for example, Public to marshal and unmarshal the underlying FFI type (e.g. TPM2B_PUBLIC). This would allow data to be moved between different machines that need to work with the same TPM-specific data structures.

These methods would defer to Tss2_MU_... functions exposed by the tss2-mu library (for which you can see the spec here), and so we can implement them for the types supported by this spec:

  • TPMA_... types
  • TPM_... base types
  • TPMS_... types
  • TPM2B_... types
  • TPMU_... types

I expect these new methods to simply be extensions of the existing types, so adding them won't break the API.

@ionut-arm ionut-arm added enhancement New feature or request medium Effort label labels Nov 17, 2021
@Superhepper
Copy link
Collaborator

In #293 I added traits for this that I also implemented for the Attest type in order to make things easier if one wishes to make a generic function for types that can be marshalled or unmarshalled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium Effort label
Projects
None yet
Development

No branches or pull requests

2 participants