-
Notifications
You must be signed in to change notification settings - Fork 46
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
Handle non-consecutive tag numbers in Sigma3 certificate extensions #97
Conversation
…zed again, and then when deserialized it matches
@ssnover Hmmmm, this looks like a temp fix to me, that would only address proper decoding of the However, isn't the real, proper fix to touch the proc-macros, so that |
I think the issue is primarily one of data representation. Extensions here is a struct, but in TLV it is a list of variants, each of which should appear at most once. I don't think the uniqueness constraint could reliably be represented in the macro as that requirement is not necessarily there for all lists. However, I can see why this representation of a struct of Options would be chosen for a microcontroller, it's much easier to work with on the device side this way. Needing to scan a list for a value like the subject key ID each time would be annoying, but so would needing to define one struct for deserializing and another to copy all the data into for access purposes, especially when this is happening on every CASE session. |
I'm not sure I follow. For me, the problem of modeling that some/all items in the list are optional is completely orthogonal to the problem (that we actually have), that these items might pop up in arbitrary order. Which needs fixing on the proc macro level that currently probably assumes that these appear in increasing tag ID order in the tlv. |
@ssnover Actually, there is already a support for unordered tag IDs. So the fix should be as simple as adding an |
That did the trick all right, thanks for the pointer! |
This addresses #96 by adding param
unordered
forFromTLV
forExtensions
such that the incoming order does not matter.