Skip to content
Commit 3dc86c90 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Compute TLV size from actual size



Instead of having lots of magic numbers to try and track the resulting
size of the TLV, just determine the size we end up with after encoding
it.  The only place the size is used is in the header within the TLV
itself.  Make this work by putting a placeholder in the TLV, and then
patching the value back after we know the full size.

In addition to removing a lot of magic numbers from the code, this will
make it easier to handle things that vary in size, such as X.509
certificates.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 2b73ed94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment