avbtool: Fix overallocation for Authentication Data block.
It was reported by Esun Kim that avbtool allocated too much space for
the authentication data block which resulted in vbmeta.img being
bigger than it needed to be. Better to only allocate the amount of
space of we need.
Bug: None
Test: Unit tests pass.
Test: Manually tested on UEFI based bootloader.
Change-Id: Id34ded854d0ee0d35f51122b9b20a3939a4cbc7f
diff --git a/avbtool b/avbtool
index 4b1ed45..f467c70 100755
--- a/avbtool
+++ b/avbtool
@@ -2028,7 +2028,7 @@
# For the Authentication data block, the hash is first and then
# the signature.
h.authentication_data_block_size = round_to_multiple(
- alg.hash_num_bytes + alg.public_key_num_bytes, 64)
+ alg.hash_num_bytes + alg.signature_num_bytes, 64)
h.algorithm_type = alg.algorithm_type
h.hash_offset = 0
h.hash_size = alg.hash_num_bytes