Address CDM compilation warnings for android am: adf03c92f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22333742 Change-Id: I78a08a80b18dbdb3b9058251fba36e1697101bbb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -214,11 +214,12 @@ OEMCryptoResult ContentKeySession::GenericVerify(const std::string& message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
OEMCryptoResult ContentKeySession::LoadKeysAsLicenseType(
|
OEMCryptoResult ContentKeySession::LoadKeysAsLicenseType(
|
||||||
const std::string& message, const std::string& signature,
|
const std::string& /* message */, const std::string& /* signature */,
|
||||||
const std::string& mac_key_iv, const std::string& mac_key,
|
const std::string& /* mac_key_iv */, const std::string& /* mac_key */,
|
||||||
const std::vector<CryptoKey>& keys,
|
const std::vector<CryptoKey>& /* keys */,
|
||||||
const std::string& provider_session_token,
|
const std::string& /* provider_session_token */,
|
||||||
const std::string& srm_requirement, OEMCrypto_LicenseType license_type) {
|
const std::string& /* srm_requirement */,
|
||||||
|
OEMCrypto_LicenseType /* license_type */) {
|
||||||
// TODO(b/252670759): remove all of this.
|
// TODO(b/252670759): remove all of this.
|
||||||
// const uint8_t* msg = reinterpret_cast<const uint8_t*>(message.data());
|
// const uint8_t* msg = reinterpret_cast<const uint8_t*>(message.data());
|
||||||
// cached_key_id_.clear();
|
// cached_key_id_.clear();
|
||||||
|
|||||||
@@ -1074,18 +1074,20 @@ CdmResponseType CryptoSession::PrepareAndSignLicenseRequest(
|
|||||||
"PrepareAndSignLicenseRequest");
|
"PrepareAndSignLicenseRequest");
|
||||||
}
|
}
|
||||||
|
|
||||||
CdmResponseType CryptoSession::UseSecondaryKey(bool dual_key) {
|
|
||||||
#ifdef HAS_DUAL_KEY
|
#ifdef HAS_DUAL_KEY
|
||||||
|
CdmResponseType CryptoSession::UseSecondaryKey(bool dual_key) {
|
||||||
OEMCryptoResult sts;
|
OEMCryptoResult sts;
|
||||||
WithOecSessionLock("UseSecondaryKey", [&] {
|
WithOecSessionLock("UseSecondaryKey", [&] {
|
||||||
sts = OEMCrypto_UseSecondaryKey(oec_session_id_, dual_key);
|
sts = OEMCrypto_UseSecondaryKey(oec_session_id_, dual_key);
|
||||||
});
|
});
|
||||||
|
|
||||||
return MapOEMCryptoResult(sts, LOAD_KEY_ERROR, "UseSecondaryKey");
|
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,
|
CdmResponseType CryptoSession::LoadLicense(const std::string& signed_message,
|
||||||
const std::string& core_message,
|
const std::string& core_message,
|
||||||
|
|||||||
@@ -234,7 +234,8 @@ CdmResponseType ServiceCertificate::EncryptRsaOaep(
|
|||||||
}
|
}
|
||||||
|
|
||||||
CdmResponseType ServiceCertificate::EncryptClientId(
|
CdmResponseType ServiceCertificate::EncryptClientId(
|
||||||
CryptoSession* crypto_session, const ClientIdentification* clear_client_id,
|
CryptoSession* /* crypto_session */,
|
||||||
|
const ClientIdentification* clear_client_id,
|
||||||
EncryptedClientIdentification* encrypted_client_id) const {
|
EncryptedClientIdentification* encrypted_client_id) const {
|
||||||
encrypted_client_id->set_provider_id(provider_id_);
|
encrypted_client_id->set_provider_id(provider_id_);
|
||||||
encrypted_client_id->set_service_certificate_serial_number(serial_number_);
|
encrypted_client_id->set_service_certificate_serial_number(serial_number_);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -406,11 +408,13 @@ class AndroidFile : public File {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOGD(
|
LOGD(
|
||||||
"Stat: path = %s, st_dev = %lu, st_ino = %lu, st_mode = 0%o (%s), "
|
"Stat: path = %s, st_dev = %" PRIu64 ", st_ino = %" PRIu64
|
||||||
"st_uid = %u, st_gid = %u, st_size = %ld, st_atime = %s, "
|
", st_mode = 0%o (%s), st_uid = %u, st_gid = %u, st_size = %" PRId64
|
||||||
"st_mtime = %s, st_ctime = %s",
|
", st_atime = %s, st_mtime = %s, st_ctime = %s",
|
||||||
file_path(), st.st_dev, st.st_ino, st.st_mode,
|
file_path(), static_cast<uint64_t>(st.st_dev),
|
||||||
StatModeToString(st.st_mode).c_str(), st.st_uid, st.st_gid, st.st_size,
|
static_cast<uint64_t>(st.st_ino), st.st_mode,
|
||||||
|
StatModeToString(st.st_mode).c_str(), st.st_uid, st.st_gid,
|
||||||
|
static_cast<int64_t>(st.st_size),
|
||||||
PosixTimeToString(st.st_atime).c_str(),
|
PosixTimeToString(st.st_atime).c_str(),
|
||||||
PosixTimeToString(st.st_mtime).c_str(),
|
PosixTimeToString(st.st_mtime).c_str(),
|
||||||
PosixTimeToString(st.st_ctime).c_str());
|
PosixTimeToString(st.st_ctime).c_str());
|
||||||
|
|||||||
@@ -83,15 +83,16 @@ ScopedAStatus WidevineRemotelyProvisionedComponent::getHardwareInfo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScopedAStatus WidevineRemotelyProvisionedComponent::generateEcdsaP256KeyPair(
|
ScopedAStatus WidevineRemotelyProvisionedComponent::generateEcdsaP256KeyPair(
|
||||||
bool testMode, MacedPublicKey* macedPublicKey, bytevec* privateKeyHandle) {
|
bool /* testMode */, MacedPublicKey* /* macedPublicKey */,
|
||||||
|
bytevec* /* privateKeyHandle */) {
|
||||||
return Status("Invalid operation.");
|
return Status("Invalid operation.");
|
||||||
}
|
}
|
||||||
|
|
||||||
ScopedAStatus WidevineRemotelyProvisionedComponent::generateCertificateRequest(
|
ScopedAStatus WidevineRemotelyProvisionedComponent::generateCertificateRequest(
|
||||||
bool testMode, const vector<MacedPublicKey>& keysToSign,
|
bool testMode, const vector<MacedPublicKey>& keysToSign,
|
||||||
const bytevec& endpointEncCertChain, const bytevec& challenge,
|
const bytevec& endpointEncCertChain, const bytevec& /* challenge */,
|
||||||
DeviceInfo* deviceInfo, ProtectedData* protectedData,
|
DeviceInfo* deviceInfo, ProtectedData* protectedData,
|
||||||
bytevec* keysToSignMac) {
|
bytevec* /* keysToSignMac */) {
|
||||||
if (!keysToSign.empty()) {
|
if (!keysToSign.empty()) {
|
||||||
return Status("Invalid operation: Keys to sign must be empty.");
|
return Status("Invalid operation: Keys to sign must be empty.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ void Log(const char* file, const char* function, int line, LogPriority level,
|
|||||||
android_LogPriority prio = ANDROID_LOG_VERBOSE;
|
android_LogPriority prio = ANDROID_LOG_VERBOSE;
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
case CDM_LOG_SILENT:
|
||||||
|
return;
|
||||||
case CDM_LOG_ERROR:
|
case CDM_LOG_ERROR:
|
||||||
prio = ANDROID_LOG_ERROR;
|
prio = ANDROID_LOG_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user