Allow querying of OEMCrypto build information

[ Merge of http://go/wvgerrit/67503 ]

Bug: 117118184
Test: WV unit/integration tests
Change-Id: I8db90c1617e068a4711eb41a5852d15b5e228f2f
This commit is contained in:
Rahul Frias
2018-12-04 23:46:47 -08:00
parent caa8c99752
commit 5f96a20d99
8 changed files with 43 additions and 0 deletions

View File

@@ -1773,6 +1773,24 @@ bool CryptoSession::LoadSrm(const std::string& srm) {
return true;
}
bool CryptoSession::GetBuildInformation(std::string* info) {
LOGV("GetBuildInformation");
if (!initialized_) return false;
if (info == nullptr) {
LOGE("CryptoSession::GetBuildInformation: |info| cannot be empty");
return false;
}
const char* build_information =
OEMCrypto_BuildInformation(requested_security_level_);
if (build_information == nullptr) {
LOGE("CryptoSession::GetBuildInformation: returned null");
return false;
}
info->assign(build_information);
return true;
}
CdmResponseType CryptoSession::GenericEncrypt(const std::string& in_buffer,
const std::string& key_id,
const std::string& iv,