Address CDM compilation warnings for android

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

Bug: 275675184
Test: Compile and GtsMediaTestCases
Change-Id: I3dc01f383a1fae07c126782e8d3561ab724316a8
This commit is contained in:
Rahul Frias
2023-03-29 02:29:40 -07:00
parent 68e1eac8ec
commit adf03c92f4
6 changed files with 29 additions and 18 deletions

View File

@@ -214,11 +214,12 @@ OEMCryptoResult ContentKeySession::GenericVerify(const std::string& message,
}
OEMCryptoResult ContentKeySession::LoadKeysAsLicenseType(
const std::string& message, const std::string& signature,
const std::string& mac_key_iv, const std::string& mac_key,
const std::vector<CryptoKey>& keys,
const std::string& provider_session_token,
const std::string& srm_requirement, OEMCrypto_LicenseType license_type) {
const std::string& /* message */, const std::string& /* signature */,
const std::string& /* mac_key_iv */, const std::string& /* mac_key */,
const std::vector<CryptoKey>& /* keys */,
const std::string& /* provider_session_token */,
const std::string& /* srm_requirement */,
OEMCrypto_LicenseType /* license_type */) {
// TODO(b/252670759): remove all of this.
// const uint8_t* msg = reinterpret_cast<const uint8_t*>(message.data());
// cached_key_id_.clear();

View File

@@ -1074,18 +1074,20 @@ CdmResponseType CryptoSession::PrepareAndSignLicenseRequest(
"PrepareAndSignLicenseRequest");
}
CdmResponseType CryptoSession::UseSecondaryKey(bool dual_key) {
#ifdef HAS_DUAL_KEY
CdmResponseType CryptoSession::UseSecondaryKey(bool dual_key) {
OEMCryptoResult sts;
WithOecSessionLock("UseSecondaryKey", [&] {
sts = OEMCrypto_UseSecondaryKey(oec_session_id_, dual_key);
});
return MapOEMCryptoResult(sts, LOAD_KEY_ERROR, "UseSecondaryKey");
#else
return CdmResponseType(NO_ERROR);
#endif
}
#else
CdmResponseType CryptoSession::UseSecondaryKey(bool /* dual_key */) {
return CdmResponseType(NO_ERROR);
}
#endif
CdmResponseType CryptoSession::LoadLicense(const std::string& signed_message,
const std::string& core_message,

View File

@@ -234,7 +234,8 @@ CdmResponseType ServiceCertificate::EncryptRsaOaep(
}
CdmResponseType ServiceCertificate::EncryptClientId(
CryptoSession* crypto_session, const ClientIdentification* clear_client_id,
CryptoSession* /* crypto_session */,
const ClientIdentification* clear_client_id,
EncryptedClientIdentification* encrypted_client_id) const {
encrypted_client_id->set_provider_id(provider_id_);
encrypted_client_id->set_service_certificate_serial_number(serial_number_);