Make it possible to include public key metadata.

A new option --public_key_metadata can be used at image build time to
include a "public key metadata" blob in the vbmeta struct and this
data is passed to the validate_vbmeta_public_key() AvbOps operation
along with the public key.

The use-case for this option is a device where the root-of-trust
embedded in the device is different from the key used to sign AVB
metadata. Specifically, the public key metadata blob can be data
signed by the device root-of-trust and the data could assert the trust
chain between this root-of-trust and the AVB public key used to sign
the AVB metadata.

(This change breaks the on-disk image format but that's OK because
we're still pre-1.0 with respect to image format stability
guarantees.)

Bug: 32736356
Test: New unit tests and all unit tests pass.
Test: Tested in UEFI-based bootloader in qemu.

Change-Id: I7b9c3bf2f9326b5bb5659b2a431a59a5c9016aff
10 files changed
tree: 54d47a26d2375312fb26e2ad5a44a6129afd2ae1
  1. boot_control/
  2. libavb/
  3. libavb_ab/
  4. test/
  5. Android.mk
  6. avbtool
  7. LICENSE
  8. README