diff options
Diffstat (limited to 'ng/AndroidKeyMintDevice.cpp')
-rw-r--r-- | ng/AndroidKeyMintDevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ AndroidKeyMintDevice::AndroidKeyMintDevice(SecurityLevel securityLevel) // 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)), |