Pass verified boot info to software keymint

Add SetVerifiedBootInfo to KeymasterContext, allowing information about
the AVB status to be sent to keymint.

Add verious setters to RemoteProvisioningContext that mirror those in
KeymasterContext, as RemoteProvisioningContext now needs the same
data for building DeviceInfo.

Add ConfigureVerifiedBootInfoRequest for passing the verified boot
info over the wire to a keymint implementation. This includes new
serialization to make it easier to put C++ collections in messages.
Logging errors on deserialization required a small change to logger.h,
as the macro names conflict with identical ones in trusty.

Update pure software keymint with verified boot info.

Test: keymaster_tests
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Icd56c6616e5dcd2d2f31862e1444c306f393609b
diff --git a/ng/AndroidKeyMintDevice.cpp b/ng/AndroidKeyMintDevice.cpp
index 08a1036..373ec03 100644
--- a/ng/AndroidKeyMintDevice.cpp
+++ b/ng/AndroidKeyMintDevice.cpp
@@ -225,6 +225,14 @@
               // The OS patch level only has a year and a month so we just add the 1st
               // of the month as day field.
               context->SetBootPatchlevel(GetOsPatchlevel() * 100 + 1);
+              auto digest = ::keymaster::GetVbmetaDigest();
+              if (digest) {
+                  std::string bootState = ::keymaster::GetVerifiedBootState();
+                  std::string bootloaderState = ::keymaster::GetBootloaderState();
+                  context->SetVerifiedBootInfo(bootState, bootloaderState, *digest);
+              } else {
+                  LOG(ERROR) << "Unable to read vb_meta digest";
+              }
               return context;
           }(),
           kOperationTableSize)),