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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user