Skip to content
Commit 639a1ec4 authored by Thomas Altenbach's avatar Thomas Altenbach Committed by Jamie
Browse files

sim: Make TLV size for ECDSA signature constant



ECDSA signatures are encoded as ASN.1 and the size of the ASN.1
representation can vary depending on the value of the two integers the
signature is composed of. This means that when ECDSA is used, the size
of the TLV area is not always equal to the size that was estimated by
the simulator when attempting to determine the maximum image size.
Indeed, the estimate gives the maximum possible size of the TLV area and
depending on its actual size, the generated images might be in fact a
bit smaller than expected.

This is not a big issue but adds a bit of randomness in the simulation
and make difficult to generate precisely oversized images when desired
for example.

This commit ensures an ECDSA signature with the largest possible size is
always used, making the size of the corresponding TLV entry constant in
the simulator.

Signed-off-by: default avatarThomas Altenbach <thomas.altenbach@legrand.com>
parent b671a8f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment