Add X509 BCC type to protobuf and update oemcrypto adapter
BCC supports two types of format: CBOR and X509. The latter will be used by Chrome OS. In case of Prov4, BCC type will be queried by OEMCrypto_GetBCCType() and the returned value is populated in the provisioning request. This CL adds X509 type to protobuf, a call from CDM to query BCC type and OEMCrypto adapter changes for this call. Test: run_fake_l1_tests, opk_ta_p40 Bug: 307969500 Change-Id: I88acc36da6cb413d537a9ea9dfd2a150d4557595
This commit is contained in:
@@ -379,10 +379,30 @@ bool ClientIdentification::GetProvisioningTokenType(
|
||||
*token_type =
|
||||
video_widevine::ClientIdentification::OEM_DEVICE_CERTIFICATE;
|
||||
return true;
|
||||
case kClientTokenBootCertChain:
|
||||
*token_type =
|
||||
video_widevine::ClientIdentification::BOOT_CERTIFICATE_CHAIN;
|
||||
case kClientTokenBootCertChain: {
|
||||
OEMCrypto_BCCType bcc_type;
|
||||
const CdmResponseType result =
|
||||
crypto_session_->GetProvisioning40TokenType(&bcc_type);
|
||||
if (result == NOT_IMPLEMENTED_ERROR) {
|
||||
// Default to CBOR BCC for OEMCrypto that doesn't support GetBCCType().
|
||||
*token_type =
|
||||
video_widevine::ClientIdentification::BOOT_CERTIFICATE_CHAIN;
|
||||
return true;
|
||||
}
|
||||
if (result != NO_ERROR) return false;
|
||||
if (bcc_type == OEMCrypto_CBOR) {
|
||||
*token_type =
|
||||
video_widevine::ClientIdentification::BOOT_CERTIFICATE_CHAIN;
|
||||
} else if (bcc_type == OEMCrypto_X509) {
|
||||
*token_type =
|
||||
video_widevine::ClientIdentification::BOOT_CERTIFICATE_CHAIN_X509;
|
||||
} else {
|
||||
// shouldn't happen
|
||||
LOGE("Unexpected BCC type: %d", static_cast<int>(bcc_type));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case kClientTokenDrmCert:
|
||||
// TODO: b/305093063 - Add token for DRM reprovisioning requests.
|
||||
case kClientTokenDrmReprovisioning:
|
||||
|
||||
Reference in New Issue
Block a user