Conversation

Jarkko Sakkinen

Edited 4 days ago
In tpm2-protocol, extended "response round-trip" test to understand crate's error codes with the worst parser ever written:

0176 Success 80010000002000000000800200000010bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
017E TrailingData 800100000038000000000000000100000000000000010020aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadeadbeef
0144 NotDiscriminant("TpmSt", Unsigned(0xffff)) ffff0000000a00000000
0176 Success 80010000003000000000030000000020ab967bc21b9c90096051d1e0f0dbfb29fc27258b03705fbc0c40aaaac88ed5e5

This also helps to better understand whether the pre-existing error codes make sense, how they should be modified, what should be added/removed etc. in the future versions of this crate.
1
1
1
The goal is to convert all tests to data first and then start refactoring the crate fully zerocopy. Then tests anchor stability as they are based on the only immutable portion of the project i.e., protocol data itself.
0
0
1