-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
One cannot marshal unions directly since they need a type selector. Perhaps make the marshal routine smart enough to know if it's in a union and need an extra argument for the selector value or seperate the union marshal out to it's own thing that union types can inherit from.
b = TPMU_PUBLIC_ID(rsa=b"\x00" * 256).marshal()
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
b = TPMU_PUBLIC_ID(rsa=b"\x00" * 256).marshal()
File "/usr/local/lib64/python3.13/site-packages/tpm2_pytss/types.py", line 222, in marshal
_chkrc(mfunc(_cdata, buf, 4096, offset))
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Tss2_MU_TPMU_PUBLIC_ID_Marshal expected 5 arguments, got 4
>>>
Metadata
Metadata
Assignees
Labels
No labels