Source release 17.1.2

This commit is contained in:
John "Juce" Bruce
2023-06-23 15:37:42 -07:00
parent a10f13a2dc
commit 2baa7c6e2b
353 changed files with 12903 additions and 2305 deletions

View File

@@ -305,8 +305,11 @@ CdmResponseType CdmSession::RestoreOfflineSession(const CdmKeySetId& key_set_id,
std::string fake_message("empty message");
std::string core_message;
std::string license_request_signature;
uint32_t nonce;
// Sign a fake message so that OEMCrypto will start the rental clock. The
// signature and generated core message are ignored.
result = crypto_session_->GenerateNonce(&nonce);
if (result != NO_ERROR) return result;
result = crypto_session_->PrepareAndSignLicenseRequest(
fake_message, &core_message, &license_request_signature);
if (result != NO_ERROR) return result;
@@ -1017,8 +1020,7 @@ bool CdmSession::DeleteLicenseFile() {
std::string app_id;
GetApplicationId(&app_id);
return file_handle_->DeleteUsageInfo(
DeviceFiles::GetUsageInfoFileName(app_id),
license_parser_->provider_session_token());
DeviceFiles::GetUsageInfoFileName(app_id), key_set_id_);
}
}
@@ -1151,8 +1153,7 @@ bool CdmSession::UpdateUsageInfo() {
usage_data.usage_entry_number = usage_entry_number_;
return file_handle_->UpdateUsageInfo(
DeviceFiles::GetUsageInfoFileName(app_id), usage_provider_session_token_,
usage_data);
DeviceFiles::GetUsageInfoFileName(app_id), usage_data);
}
void CdmSession::UpdateRequestLatencyTiming(CdmResponseType sts) {
@@ -1237,6 +1238,18 @@ CdmResponseType CdmSession::LoadPrivateKey(
}
}
CdmResponseType CdmSession::LoadCastPrivateKey(
const CryptoWrappedKey& private_key) {
return crypto_session_->LoadCertificatePrivateKey(private_key);
}
CdmResponseType CdmSession::GenerateRsaSignature(const std::string& message,
std::string* signature,
RSA_Padding_Scheme scheme) {
return crypto_session_->GenerateRsaSignature(message, signature,
scheme);
}
// For testing only - takes ownership of pointers
void CdmSession::set_license_parser(CdmLicense* license_parser) {