Snap for 4686875 from db0911df54 to pi-release
Change-Id: I7a32241a67c7cf3b97db41b61c5d35c2889b3674
This commit is contained in:
@@ -854,12 +854,20 @@ CdmResponseType CdmEngine::HandleProvisioningResponse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CdmEngine::IsProvisioned(CdmSecurityLevel security_level) {
|
bool CdmEngine::IsProvisioned(CdmSecurityLevel security_level) {
|
||||||
DeviceFiles handle(file_system_);
|
// To validate whether the given security level is provisioned, we attempt to
|
||||||
if (!handle.Init(security_level)) {
|
// initialize a CdmSession. This verifies the existence of a certificate and
|
||||||
LOGE("CdmEngine::IsProvisioned: unable to initialize device files");
|
// attempts to load it. If this fails, initialization will return an error.
|
||||||
return false;
|
UsagePropertySet property_set;
|
||||||
|
property_set.set_security_level(
|
||||||
|
security_level == kSecurityLevelL3 ? kLevel3 : kLevelDefault);
|
||||||
|
|
||||||
|
CdmSession session(file_system_, metrics_.AddSession());
|
||||||
|
|
||||||
|
CdmResponseType status = session.Init(&property_set);
|
||||||
|
if (NO_ERROR != status) {
|
||||||
|
LOGE("CdmEngine::IsProvisioned: CdmSession::Init returned %lu", status);
|
||||||
}
|
}
|
||||||
return handle.HasCertificate();
|
return status == NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
CdmResponseType CdmEngine::Unprovision(CdmSecurityLevel security_level) {
|
CdmResponseType CdmEngine::Unprovision(CdmSecurityLevel security_level) {
|
||||||
|
|||||||
Reference in New Issue
Block a user