Add API for device provisioning server certificate

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

This is separate from the server certificate used for license
requests.

b/34211823

Test: Reran unittests. All tests other than some oemcrypto,
request_license_test passed. Those tests failed with or without this CL.

Change-Id: I23abdf276f8d3db9222f014175d0bb5094010a04
This commit is contained in:
Rahul Frias
2017-01-09 19:42:46 -08:00
parent b413037733
commit 2045316001
7 changed files with 62 additions and 0 deletions

View File

@@ -80,6 +80,28 @@ bool Properties::SetServiceCertificate(const CdmSessionId& session_id,
return true;
}
bool Properties::GetDeviceProvisioningServiceCertificate(
const CdmSessionId& session_id, std::string* service_certificate) {
const CdmClientPropertySet* property_set =
GetCdmClientPropertySet(session_id);
if (NULL == property_set) {
return false;
}
*service_certificate = property_set->device_provisioning_service_certificate();
return true;
}
bool Properties::SetDeviceProvisioningServiceCertificate(
const CdmSessionId& session_id, const std::string& service_certificate) {
CdmClientPropertySet* property_set =
GetCdmClientPropertySet(session_id);
if (NULL == property_set) {
return false;
}
property_set->set_device_provisioning_service_certificate(service_certificate);
return true;
}
bool Properties::UsePrivacyMode(const CdmSessionId& session_id) {
const CdmClientPropertySet* property_set =
GetCdmClientPropertySet(session_id);