diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-04 02:04:55 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-04 02:04:55 +0000 |
commit | a3dee8c207aa0a318fc8ab93d435230607285daa (patch) | |
tree | a74350c0d91553a867a757fc4920962c0e568655 | |
parent | e07ae70edd40ea16459bc364daa46f7b3dab34e0 (diff) | |
parent | b034469f3d9e86e33e6cf3f281362d5a1f3f7707 (diff) | |
download | keymaster-android11-d1-release.tar.gz |
Snap for 6362488 from b034469f3d9e86e33e6cf3f281362d5a1f3f7707 to rvc-d1-releaseandroid-11.0.0_r9android-11.0.0_r8android-11.0.0_r7android-11.0.0_r15android-11.0.0_r14android-11.0.0_r13android-11.0.0_r12android-11.0.0_r11android-11.0.0_r10android11-d1-s7-releaseandroid11-d1-s6-releaseandroid11-d1-s5-releaseandroid11-d1-s1-releaseandroid11-d1-release
Change-Id: I69d781ad06c87454196d567e4ad30aa00a4befb9
-rw-r--r-- | contexts/soft_keymaster_context.cpp | 12 | ||||
-rw-r--r-- | include/keymaster/contexts/soft_keymaster_context.h | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/contexts/soft_keymaster_context.cpp b/contexts/soft_keymaster_context.cpp index 6c23fa4..5003c72 100644 --- a/contexts/soft_keymaster_context.cpp +++ b/contexts/soft_keymaster_context.cpp @@ -476,4 +476,16 @@ keymaster_error_t SoftKeymasterContext::UnwrapKey(const KeymasterKeyBlob&, const return KM_ERROR_UNIMPLEMENTED; } +keymaster_error_t SoftKeymasterContext::GetVerifiedBootParams( + keymaster_blob_t* verified_boot_key, keymaster_blob_t* verified_boot_hash, + keymaster_verified_boot_t* verified_boot_state, bool* device_locked) const { + // TODO(swillden): See if there might be some sort of vbmeta data in goldfish/cuttlefish. + static std::string fake_vb_key(32, 0); + *verified_boot_key = {reinterpret_cast<uint8_t*>(fake_vb_key.data()), fake_vb_key.size()}; + *verified_boot_hash = {reinterpret_cast<uint8_t*>(fake_vb_key.data()), fake_vb_key.size()}; + *verified_boot_state = KM_VERIFIED_BOOT_UNVERIFIED; + *device_locked = false; + return KM_ERROR_OK; +} + } // namespace keymaster diff --git a/include/keymaster/contexts/soft_keymaster_context.h b/include/keymaster/contexts/soft_keymaster_context.h index 588e3db..20a10ac 100644 --- a/include/keymaster/contexts/soft_keymaster_context.h +++ b/include/keymaster/contexts/soft_keymaster_context.h @@ -104,6 +104,15 @@ class SoftKeymasterContext: public KeymasterContext, SoftwareKeyBlobMaker, Softw AuthorizationSet* sw_enforced) const override; /*********************************************************************************************/ + /********************************************************************************************* + * Implement AttestationRecordContext + */ + + keymaster_error_t GetVerifiedBootParams(keymaster_blob_t* verified_boot_key, + keymaster_blob_t* verified_boot_hash, + keymaster_verified_boot_t* verified_boot_state, + bool* device_locked) const override; + private: keymaster_error_t ParseKeymaster1HwBlob(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, |