Provide BCC in WVDrmFactory dumpsys.
[ Merge of go/wvgerrit/c/cdm/+/165138 ] Enabled the Widevine DRM service on Android to return the raw boot certificate chain via the CDM status query capabilities. This property key is not available for app-level queries. The BCC is dumped by the WVDrmFactory when requested to print all CDM properties via dumpsys. Bug: 234095402 Test: request_license_test Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -p Change-Id: I34695b0655b4c609979577e9986974bc0fbda898
This commit is contained in:
@@ -852,6 +852,25 @@ CdmResponseType CdmEngine::QueryStatus(RequestedSecurityLevel security_level,
|
||||
*query_response = std::to_string(system_id);
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
if (query_token == QUERY_KEY_DEBUG_BOOT_CERTIFICATE_CHAIN) {
|
||||
std::string bcc;
|
||||
std::string signature_unused;
|
||||
const CdmResponseType status = crypto_session->GetBootCertificateChain(
|
||||
security_level, &bcc, &signature_unused);
|
||||
if (status == NO_ERROR) {
|
||||
LOGD("BCC length: %zu", bcc.size());
|
||||
*query_response = std::move(bcc);
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
if (status == NOT_IMPLEMENTED_ERROR ||
|
||||
status == PROVISIONING_TYPE_IS_NOT_BOOT_CERTIFICATE_CHAIN_ERROR) {
|
||||
LOGD("BCC not available: %d", static_cast<int>(status.Enum()));
|
||||
*query_response = QUERY_VALUE_NONE;
|
||||
return CdmResponseType(NO_ERROR);
|
||||
}
|
||||
LOGE("Failed to extract BCC: status = %d", static_cast<int>(status.Enum()));
|
||||
return status;
|
||||
}
|
||||
|
||||
CdmResponseType status;
|
||||
M_TIME(status = crypto_session->Open(security_level),
|
||||
|
||||
Reference in New Issue
Block a user