Source release v2.1.1-0-738 + third_party libs
Change-Id: I76e298f8092951d4214c776d6bbcad6b763eb5b2
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Copyright 2013 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Builds under the CDM ./build/build.py (target platform) build system
|
||||
# Builds under the CDM ./build.py (target platform) build system
|
||||
# Refer to the distribution package's README for details.
|
||||
#
|
||||
{
|
||||
@@ -22,32 +22,18 @@
|
||||
'../core/test',
|
||||
'../oemcrypto/include',
|
||||
],
|
||||
'ldflags': [
|
||||
'-L$(builddir_name)/$(BUILDTYPE)/lib.target',
|
||||
'-L$(builddir_name)/$(BUILDTYPE)',
|
||||
'-Wl,-rpath=$(builddir_name)/$(BUILDTYPE)/lib.target/',
|
||||
],
|
||||
'libraries': [
|
||||
'$(builddir_name)/$(BUILDTYPE)/lib.target/libwvcdm_shared.so',
|
||||
'-lssl',
|
||||
'-lcrypto',
|
||||
'-lpthread',
|
||||
'-lprotobuf',
|
||||
],
|
||||
'dependencies': [
|
||||
'cdm_api_internal.gyp:<(cdm_target_name)',
|
||||
'test/gmock.gyp:gmock',
|
||||
'test/gmock.gyp:gmock_main',
|
||||
'test/gtest.gyp:gtest',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'external_build==0',
|
||||
{
|
||||
'dependencies': [
|
||||
'../cdm/cdm_api_internal.gyp:wvcdm_shared',
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Refer to the distribution package's README for information about
|
||||
# setting up your system, performing the build, and using/testing
|
||||
# the build targets.
|
||||
#
|
||||
|
||||
# Set external_build=0 via GYP_DEFINES if debug information in
|
||||
# libwvcdm_shared.so is desirable.
|
||||
{
|
||||
@@ -16,7 +16,7 @@
|
||||
'proto_in_dir': '../core/src',
|
||||
'proto_out_dir': 'license_protocol',
|
||||
},
|
||||
'includes': ['../build/protoc.gypi'],
|
||||
'includes': ['../third_party/protoc.gypi'],
|
||||
},
|
||||
{
|
||||
'target_name': 'device_files',
|
||||
@@ -26,7 +26,7 @@
|
||||
'proto_in_dir': '../core/src',
|
||||
'proto_out_dir': 'device_files',
|
||||
},
|
||||
'includes': ['../build/protoc.gypi'],
|
||||
'includes': ['../third_party/protoc.gypi'],
|
||||
},
|
||||
{
|
||||
'target_name': 'wvcdm_sysdep',
|
||||
@@ -48,8 +48,8 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'wvcdm_shared',
|
||||
'type': 'shared_library',
|
||||
'target_name': '<(cdm_target_name)',
|
||||
'type': '<(cdm_target_type)',
|
||||
'defines': ['CDM_IMPLEMENTATION'],
|
||||
'dependencies': [
|
||||
'license_protocol',
|
||||
@@ -75,6 +75,7 @@
|
||||
'../core/src/certificate_provisioning.cpp',
|
||||
'../core/src/crypto_session.cpp',
|
||||
'../core/src/device_files.cpp',
|
||||
'../core/src/initialization_data.cpp',
|
||||
'../core/src/license.cpp',
|
||||
'../core/src/oemcrypto_adapter_static.cpp',
|
||||
'../core/src/policy_engine.cpp',
|
||||
|
||||
@@ -8,13 +8,7 @@
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
class IFileFactory {
|
||||
protected:
|
||||
IFileFactory(){}
|
||||
virtual ~IFileFactory(){}
|
||||
public:
|
||||
virtual File::Impl* NewFileImpl () = 0;
|
||||
};
|
||||
class IFileFactory;
|
||||
|
||||
class File::Impl {
|
||||
public:
|
||||
@@ -38,6 +32,14 @@ class File::Impl {
|
||||
std::string fname_;
|
||||
};
|
||||
|
||||
class IFileFactory {
|
||||
protected:
|
||||
IFileFactory(){File::Impl::RegisterFileFactory(this);}
|
||||
virtual ~IFileFactory(){}
|
||||
public:
|
||||
virtual File::Impl* NewFileImpl () = 0;
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CDM_CDM_HOST_FILE_H_
|
||||
|
||||
@@ -8,19 +8,16 @@
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
// If false begin license usage on first playback
|
||||
const bool kPropertyBeginLicenseUsageWhenReceived = false;
|
||||
|
||||
// If false, calls to Generate Key request, after the first one,
|
||||
// will result in a renewal request being generated
|
||||
const bool kPropertyRequireExplicitRenewRequest = false;
|
||||
|
||||
// Set only one of the three below to true. If secure buffer
|
||||
// Set only one of the two below to true. If secure buffer
|
||||
// is selected, fallback to userspace buffers may occur
|
||||
// if L1/L2 OEMCrypto APIs fail
|
||||
const bool kPropertyOemCryptoUseSecureBuffers = false;
|
||||
// if L1/L2 OEMCrypto APIs fail.
|
||||
// Note: This is managed in the build configuration.
|
||||
const bool kPropertyOemCryptoUseSecureBuffers = PLATFORM_REQUIRES_SECURE_BUFFERS;
|
||||
const bool kPropertyOemCryptoUseFifo = true;
|
||||
const bool kPropertyOemCryptoUseUserSpaceBuffers = true;
|
||||
const bool kPropertyOemCryptoUseUserSpaceBuffers = PLATFORM_USES_CLEAR_BUFFERS;
|
||||
|
||||
// If true, the unit tests require OEMCrypto to support usage tables.
|
||||
const bool kPropertyOemCryptoRequireUsageTable = false;
|
||||
|
||||
// If false, keyboxes will be used as client identification
|
||||
// and passed as the token in the license request.
|
||||
@@ -29,15 +26,6 @@ const bool kPropertyOemCryptoUseUserSpaceBuffers = true;
|
||||
// .gypi files if you want your device to use certificates for provisioning.
|
||||
const bool kPropertyUseCertificatesAsIdentification = PLATFORM_CERTIFICATE_PROV;
|
||||
|
||||
// If false, extraction of widevine PSSH information from the PSSH box
|
||||
// takes place external to the CDM. This will become the default behaviour
|
||||
// once all platforms support it.
|
||||
const bool kExtractPsshData = true;
|
||||
|
||||
// If true, session_id parameter to CdmEngine::Decrypt can be empty; the
|
||||
// function will try to find out the session_id from the key_id.
|
||||
const bool kDecryptWithEmptySessionSupport = true;
|
||||
|
||||
// If true, device files will be moved to the directory specified by
|
||||
// Properties::GetDeviceFilesBasePath
|
||||
const bool kSecurityLevelPathBackwardCompatibilitySupport = false;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// Widevine CDM Kit Version
|
||||
#define WV_CDM_VERSION "v2.0.8-0-679"
|
||||
#define WV_CDM_VERSION "v2.1.1-0-738"
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
public:
|
||||
explicit WvContentDecryptionModule(cdm::Host* host)
|
||||
: host_(host), host_event_listener_(host, &cdm_engine_) {
|
||||
File::Impl::RegisterFileFactory(this);
|
||||
HostClock::SetClockInterface(this);
|
||||
}
|
||||
virtual ~WvContentDecryptionModule();
|
||||
@@ -144,8 +143,7 @@ class WvContentDecryptionModule : public cdm::ContentDecryptionModule,
|
||||
virtual int64_t GetCurrentTimeInSeconds() {
|
||||
return host_->GetCurrentWallTimeInSeconds();
|
||||
}
|
||||
cdm::Status DoSubsampleDecrypt(CdmSessionId& session_id,
|
||||
CdmDecryptionParameters& parameters,
|
||||
cdm::Status DoSubsampleDecrypt(CdmDecryptionParameters& parameters,
|
||||
std::vector<uint8_t>& iv,
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::DecryptedBlock* decrypted_block);
|
||||
|
||||
@@ -111,27 +111,27 @@ bool File::Remove(const std::string& path) {
|
||||
}
|
||||
|
||||
bool File::Copy(const std::string& from, const std::string& to) {
|
||||
// Required for linkage only - no current API implementation in the partner CDM is required.
|
||||
// Required for linkage only - no API implementation is needed by the CDM
|
||||
return false;
|
||||
}
|
||||
|
||||
bool File::List(const std::string& path, std::vector<std::string>* files) {
|
||||
// Required for linkage only - no current API implementation in the partner CDM is required.
|
||||
// Required for linkage only - no API implementation is needed by the CDM
|
||||
return false;
|
||||
}
|
||||
|
||||
bool File::CreateDirectory(std::string path) {
|
||||
// Required for linkage only - no current API implementation in the partner CDM is required.
|
||||
// Required for linkage only - no API implementation is needed by the CDM
|
||||
return true;
|
||||
}
|
||||
|
||||
bool File::IsDirectory(const std::string& path) {
|
||||
// Required for linkage only - no current API implementation in the partner CDM is required.
|
||||
// Required for linkage only - no API implementation is needed by the CDM
|
||||
return false;
|
||||
}
|
||||
|
||||
bool File::IsRegularFile(const std::string& path) {
|
||||
// Required for linkage only - no current API implementation in the partner CDM is required.
|
||||
// Required for linkage only - no API implementation is needed by the CDM
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "cdm_client_property_set.h"
|
||||
#include "content_decryption_module.h"
|
||||
#include "initialization_data.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
@@ -89,6 +90,8 @@ cdm::Status WvContentDecryptionModule::GenerateKeyRequest(
|
||||
LOGI("Enter WvContentDecryptionModule::GenerateKeyRequest()");
|
||||
CdmInitData init_data_internal(reinterpret_cast<const char*>(init_data),
|
||||
init_data_size);
|
||||
InitializationData initialization_data(ISO_BMFF_VIDEO_MIME_TYPE,
|
||||
init_data_internal);
|
||||
CdmKeyMessage key_request;
|
||||
CdmSessionId session_id;
|
||||
|
||||
@@ -124,7 +127,7 @@ cdm::Status WvContentDecryptionModule::GenerateKeyRequest(
|
||||
std::string server_url;
|
||||
|
||||
result = cdm_engine_.GenerateKeyRequest(
|
||||
session_id, key_set_id, init_data_internal, kLicenseTypeStreaming,
|
||||
session_id, key_set_id, initialization_data, kLicenseTypeStreaming,
|
||||
app_parameters, &key_request, &server_url);
|
||||
if (KEY_MESSAGE != result) {
|
||||
cdm_engine_.CloseSession(session_id);
|
||||
@@ -182,7 +185,7 @@ cdm::Status WvContentDecryptionModule::Decrypt(
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
cdm::DecryptedBlock* decrypted_block) {
|
||||
LOGI("=>Enter WvContentDecryptionModule::Decrypt()\n");
|
||||
if (encrypted_buffer.iv_size != KEY_IV_SIZE)
|
||||
if (static_cast<size_t>(encrypted_buffer.iv_size) != KEY_IV_SIZE)
|
||||
return cdm::kDecryptError;
|
||||
std::vector < uint8_t > iv(KEY_IV_SIZE);
|
||||
memcpy(&iv[0], encrypted_buffer.iv, encrypted_buffer.iv_size);
|
||||
@@ -199,9 +202,9 @@ cdm::Status WvContentDecryptionModule::Decrypt(
|
||||
CdmDecryptionParameters parameters(&key_id,
|
||||
encrypted_buffer.data, 0, &iv, 0,
|
||||
NULL);
|
||||
parameters.is_secure = false;
|
||||
return DoSubsampleDecrypt(session_id,
|
||||
parameters,
|
||||
parameters.is_secure = Properties::oem_crypto_use_secure_buffers();
|
||||
|
||||
return DoSubsampleDecrypt(parameters,
|
||||
iv,
|
||||
encrypted_buffer,
|
||||
decrypted_block);
|
||||
@@ -249,7 +252,8 @@ cdm::Status WvContentDecryptionModule::DecryptDecodeAndRenderFrame(
|
||||
const cdm::InputBuffer& encrypted_buffer) {
|
||||
LOGI("WvContentDecryptionModule::DecryptDecodeAndRenderFrame()\n");
|
||||
|
||||
if (encrypted_buffer.iv_size != KEY_IV_SIZE) return cdm::kDecryptError;
|
||||
if (static_cast<size_t>(encrypted_buffer.iv_size) != KEY_IV_SIZE)
|
||||
return cdm::kDecryptError;
|
||||
|
||||
std::vector<uint8_t> iv(KEY_IV_SIZE);
|
||||
memcpy(&iv[0], encrypted_buffer.iv, encrypted_buffer.iv_size);
|
||||
@@ -263,8 +267,7 @@ cdm::Status WvContentDecryptionModule::DecryptDecodeAndRenderFrame(
|
||||
|
||||
CdmDecryptionParameters parameters(&key_id, encrypted_buffer.data, 0, &iv, 0,
|
||||
NULL);
|
||||
return DoSubsampleDecrypt(session_id, parameters, iv, encrypted_buffer,
|
||||
NULL);
|
||||
return DoSubsampleDecrypt(parameters, iv, encrypted_buffer, NULL);
|
||||
}
|
||||
|
||||
// This is the Level 1 API. When the host application calls the CDM's
|
||||
@@ -275,7 +278,8 @@ cdm::Status WvContentDecryptionModule::DecryptDecodeAndRenderSamples(
|
||||
const cdm::InputBuffer& encrypted_buffer) {
|
||||
LOGI("WvContentDecryptionModule::DecryptDecodeAndRenderSamples()\n");
|
||||
|
||||
if (encrypted_buffer.iv_size != KEY_IV_SIZE) return cdm::kDecryptError;
|
||||
if (static_cast<size_t>(encrypted_buffer.iv_size) != KEY_IV_SIZE)
|
||||
return cdm::kDecryptError;
|
||||
|
||||
std::vector<uint8_t> iv(KEY_IV_SIZE);
|
||||
memcpy(&iv[0], encrypted_buffer.iv, encrypted_buffer.iv_size);
|
||||
@@ -290,8 +294,7 @@ cdm::Status WvContentDecryptionModule::DecryptDecodeAndRenderSamples(
|
||||
CdmDecryptionParameters parameters(&key_id, encrypted_buffer.data, 0, &iv, 0,
|
||||
NULL);
|
||||
parameters.is_video = false; // override the default true value for audio.
|
||||
return DoSubsampleDecrypt(session_id, parameters, iv, encrypted_buffer,
|
||||
NULL);
|
||||
return DoSubsampleDecrypt(parameters, iv, encrypted_buffer, NULL);
|
||||
}
|
||||
|
||||
void WvContentDecryptionModule::Destroy() { delete this; }
|
||||
@@ -299,7 +302,9 @@ void WvContentDecryptionModule::Destroy() { delete this; }
|
||||
// Provisioning related methods
|
||||
cdm::Status WvContentDecryptionModule::GetProvisioningRequest(
|
||||
std::string* request, std::string* provisioning_server_url) {
|
||||
if (cdm_engine_.GetProvisioningRequest(
|
||||
CdmCertificateType cert_type = kCertificateWidevine;
|
||||
std::string cert_authority;
|
||||
if (cdm_engine_.GetProvisioningRequest(cert_type, cert_authority,
|
||||
static_cast<CdmProvisioningRequest*>(request),
|
||||
provisioning_server_url) == NO_ERROR) {
|
||||
return cdm::kSuccess;
|
||||
@@ -309,8 +314,10 @@ cdm::Status WvContentDecryptionModule::GetProvisioningRequest(
|
||||
|
||||
cdm::Status WvContentDecryptionModule::HandleProvisioningResponse(
|
||||
std::string& response) {
|
||||
std::string cert, wrapped_key;
|
||||
if (cdm_engine_.HandleProvisioningResponse(
|
||||
static_cast<CdmProvisioningRequest&>(response)) == NO_ERROR) {
|
||||
static_cast<CdmProvisioningRequest&>(response), &cert, &wrapped_key) ==
|
||||
NO_ERROR) {
|
||||
return cdm::kSuccess;
|
||||
}
|
||||
return cdm::kSessionError;
|
||||
@@ -333,7 +340,6 @@ void WvContentDecryptionModule::OnTimerEvent() {
|
||||
}
|
||||
|
||||
cdm::Status WvContentDecryptionModule::DoSubsampleDecrypt(
|
||||
CdmSessionId& session_id,
|
||||
CdmDecryptionParameters& parameters,
|
||||
std::vector < uint8_t >& iv,
|
||||
const cdm::InputBuffer& encrypted_buffer,
|
||||
@@ -344,6 +350,8 @@ cdm::Status WvContentDecryptionModule::DoSubsampleDecrypt(
|
||||
information. Also, parameters is expected to be pre-initialized with any
|
||||
needed parameters not related to subsample parsing.
|
||||
decrypted_block may be NULL. */
|
||||
|
||||
CdmSessionId session_id; // it's empty but cdm_engine will locate via key_id.
|
||||
CdmResponseType status = NO_ERROR;
|
||||
uint8_t* output_buffer = decrypted_block
|
||||
? reinterpret_cast<uint8_t*>(
|
||||
@@ -384,9 +392,10 @@ cdm::Status WvContentDecryptionModule::DoSubsampleDecrypt(
|
||||
|
||||
parameters.is_encrypted = is_encrypted;
|
||||
parameters.subsample_flags =
|
||||
(true == first) ? OEMCrypto_FirstSubsample : 0;
|
||||
first ? OEMCrypto_FirstSubsample : 0;
|
||||
parameters.subsample_flags |= (
|
||||
offset == encrypted_buffer.data_size ? OEMCrypto_LastSubsample : 0);
|
||||
offset == static_cast<size_t>(encrypted_buffer.data_size)
|
||||
? OEMCrypto_LastSubsample : 0);
|
||||
|
||||
first = false;
|
||||
|
||||
|
||||
@@ -95,8 +95,9 @@ class TestHostFile {
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(TestHostFile);
|
||||
};
|
||||
|
||||
bool::TestHostFile::Init(const std::string& name) {
|
||||
bool TestHostFile::Init(const std::string& name) {
|
||||
fname_ = name;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TestHostFile::Exists() {
|
||||
@@ -732,13 +733,12 @@ class WvCdmApiTest : public testing::Test {
|
||||
.Times(AtLeast(1))
|
||||
.WillRepeatedly(Invoke(host_, &TestHost::GetCurrentTestTime));
|
||||
|
||||
//emulate pulling a certificate out of persistent storage.
|
||||
// emulate pulling a certificate out of persistent storage.
|
||||
static const size_t kPrivacyCertSize = 256;
|
||||
uint8_t privacyCertRaw[kPrivacyCertSize];
|
||||
memset(privacyCertRaw, kPrivacyCertSize, 0);
|
||||
for (int i = 0; i < 256; i++) {privacyCertRaw[i] = i;}
|
||||
kVectorBytes cert(kPrivacyCertSize);
|
||||
memcpy(&cert[0], privacyCertRaw, kPrivacyCertSize);
|
||||
for (size_t i = 0; i < cert.size(); i++) {
|
||||
cert[i] = i;
|
||||
}
|
||||
|
||||
host_->SetPlatformByteArray("ServiceCertificate", cert);
|
||||
INITIALIZE_CDM_MODULE();
|
||||
@@ -749,11 +749,8 @@ class WvCdmApiTest : public testing::Test {
|
||||
|
||||
std::string init_data = key_id;
|
||||
|
||||
char type = 0; // unused but as published
|
||||
int type_size; // unused but as published
|
||||
|
||||
cdm::Status status = cdm_->GenerateKeyRequest(
|
||||
&type, type_size, (const uint8_t*)init_data.data(), init_data.length());
|
||||
NULL, 0, (const uint8_t*)init_data.data(), init_data.length());
|
||||
|
||||
// cdm::Host must handle the certificate provisioning request.
|
||||
if (status == cdm::kNeedsDeviceCertificate) {
|
||||
@@ -771,7 +768,7 @@ class WvCdmApiTest : public testing::Test {
|
||||
|
||||
if (resp_bytes) {
|
||||
if (cdm_->HandleProvisioningResponse(message) == cdm::kSuccess) {
|
||||
status = cdm_->GenerateKeyRequest(&type, type_size,
|
||||
status = cdm_->GenerateKeyRequest(NULL, 0,
|
||||
(const uint8_t*)init_data.data(), init_data.length());
|
||||
}
|
||||
}
|
||||
@@ -848,11 +845,11 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data.
|
||||
// Dummy encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
"a1c78d53de1bd7e14dc5d256fd20a57178a98b83804258c239acd7aa38f2d7d2"
|
||||
@@ -864,16 +861,17 @@ class WvCdmApiTest : public testing::Test {
|
||||
"d95a133bff5f57614dda5e4446cd8837901d074149dadf4b775b5b07bb88ca20");
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
// WHAT: Expected decrypted data.
|
||||
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"FAE501E845FD5F83583F45B6D011A4A0EFC7190AF2A7314985B436BA7A946428"
|
||||
"74FD5578FA0A32FAC3DC2ACB3088315A4CBE8013A2C18C0774B117E00554EBE7"
|
||||
"508E5EF43276F77F57E19ADF3B8177F2E8132AABE61B08D801E47653393F5E34"
|
||||
"D66B45909C527D36B19FB5D8B996040211AA8A492B34BE9A5B0EBBC66EE253F4"
|
||||
"7AB0EDE457FDB5F3855C96572EBA1C8F474DE0A46F8A4D0D498902332F0C92D3"
|
||||
"FD981301BC705A6748C88B20C82F9C4E9FC574372A6EE5EFD6C1A70D9D9C1E6C"
|
||||
"202FF87D59EBEB29EF3D494B297BAF3AB6D9656CEC1C2E263E8262D6BC260F94"
|
||||
"B0F1CC98A1882D142F068DA90E6594D40716F01541F10247B8D12EAE3A8998B2");
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"eff34b8d9b7b6352e7d72de991b599662aa475da355033620152e2356ebfadee"
|
||||
"06172be9e1058fa177e223b9fdd191380cff53c3ea810c6fd852a1df4967b799"
|
||||
"415179a2276ec388ef763bab89605b9c6952c28dc8d6bf86b03fabbb46b392a3"
|
||||
"1dad15be602eeeeabb45070b3e25d6bb0217073b1fc44c9fe848594121fd6a91"
|
||||
"304d605e21f69615e1b57db18312b6b948725724b74e91d8aea7371e99532469"
|
||||
"1b358bdee873f1936b63efe83d190a53c2d21754d302d63ff285174023473755"
|
||||
"58b938c2e3ca4c2ce48942da97f9e45797f2c074ac6004734e93784a48af6160");
|
||||
|
||||
cdm::InputBuffer buf;
|
||||
|
||||
@@ -921,12 +919,12 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data. This is a combination of clear and
|
||||
// encrypted data.
|
||||
// Dummy encrypted data. This is a combination of clear and
|
||||
// encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
@@ -944,20 +942,20 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
|
||||
// WHAT: Expected decrypted data.
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"FAE501E845FD5F83583F45B6D011A4A0EFC7190AF2A7314985B436BA7A946428"
|
||||
"74FD5578FA0A32FAC3DC2ACB3088315A4CBE8013A2C18C0774B117E00554EBE7"
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"eff34b8d9b7b6352e7d72de991b599662aa475da355033620152e2356ebfadee"
|
||||
"5a36c0"
|
||||
"508E5EF432"
|
||||
"06172be9e1"
|
||||
"58b938c2e3ca4c2ce4"
|
||||
"76F77F57E19ADF3B8177F2E8132AABE61B08D801E47653393F5E34"
|
||||
"D66B45909C527D36B19FB5D8B996040211AA8A492B34BE9A5B0EBBC66EE253F4"
|
||||
"7AB0EDE457FDB5F3855C96572EBA1C8F474DE0A46F8A4D0D498902332F0C92D3"
|
||||
"FD981301BC705A6748C88B20C82F9C4E9FC574372A6EE5EFD6C1A70D9D9C1E6C"
|
||||
"202FF87D59EBEB29EF3D494B297BAF3AB6D9656CEC1C2E263E8262D6BC260F94"
|
||||
"B0F1CC98A1882D142F068DA90E6594D40716F01541F10247B8D12EAE3A8998B2");
|
||||
"058fa177e223b9fdd191380cff53c3ea810c6fd852a1df4967b799"
|
||||
"415179a2276ec388ef763bab89605b9c6952c28dc8d6bf86b03fabbb46b392a3"
|
||||
"1dad15be602eeeeabb45070b3e25d6bb0217073b1fc44c9fe848594121fd6a91"
|
||||
"304d605e21f69615e1b57db18312b6b948725724b74e91d8aea7371e99532469"
|
||||
"1b358bdee873f1936b63efe83d190a53c2d21754d302d63ff285174023473755"
|
||||
"58b938c2e3ca4c2ce48942da97f9e45797f2c074ac6004734e93784a48af6160");
|
||||
|
||||
cdm::InputBuffer buf;
|
||||
|
||||
@@ -996,7 +994,6 @@ class WvCdmApiTest : public testing::Test {
|
||||
LOGI("Verbose Acknowledgement of Test Pass!!!\n");
|
||||
}
|
||||
|
||||
// Level 1 / Level 2 payload comes back in the cpu memory as cleartext.
|
||||
void DecryptClearSubsampleTestWithMissingSubsampleInfo() {
|
||||
typedef struct DecryptionData {
|
||||
bool is_encrypted;
|
||||
@@ -1012,12 +1009,12 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data.
|
||||
// This is a combination of clear and encrypted data.
|
||||
// Dummy encrypted data. This is a combination of clear and
|
||||
// encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
@@ -1034,20 +1031,20 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
|
||||
// WHAT: Expected decrypted data.
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"FAE501E845FD5F83583F45B6D011A4A0EFC7190AF2A7314985B436BA7A946428"
|
||||
"74FD5578FA0A32FAC3DC2ACB3088315A4CBE8013A2C18C0774B117E00554EBE7"
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"eff34b8d9b7b6352e7d72de991b599662aa475da355033620152e2356ebfadee"
|
||||
"5a36c0"
|
||||
"508E5EF432"
|
||||
"06172be9e1"
|
||||
"58b938c2e3ca4c2ce4"
|
||||
"76F77F57E19ADF3B8177F2E8132AABE61B08D801E47653393F5E34"
|
||||
"D66B45909C527D36B19FB5D8B996040211AA8A492B34BE9A5B0EBBC66EE253F4"
|
||||
"7AB0EDE457FDB5F3855C96572EBA1C8F474DE0A46F8A4D0D498902332F0C92D3"
|
||||
"FD981301BC705A6748C88B20C82F9C4E9FC574372A6EE5EFD6C1A70D9D9C1E6C"
|
||||
"202FF87D59EBEB29EF3D494B297BAF3AB6D9656CEC1C2E263E8262D6BC260F94"
|
||||
"B0F1CC98A1882D142F068DA90E6594D40716F01541F10247B8D12EAE3A8998B2");
|
||||
"058fa177e223b9fdd191380cff53c3ea810c6fd852a1df4967b799"
|
||||
"415179a2276ec388ef763bab89605b9c6952c28dc8d6bf86b03fabbb46b392a3"
|
||||
"1dad15be602eeeeabb45070b3e25d6bb0217073b1fc44c9fe848594121fd6a91"
|
||||
"304d605e21f69615e1b57db18312b6b948725724b74e91d8aea7371e99532469"
|
||||
"1b358bdee873f1936b63efe83d190a53c2d21754d302d63ff285174023473755"
|
||||
"58b938c2e3ca4c2ce48942da97f9e45797f2c074ac6004734e93784a48af6160");
|
||||
|
||||
cdm::InputBuffer buf;
|
||||
|
||||
@@ -1112,11 +1109,11 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data.
|
||||
// Dummy encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
"a1c78d53de1bd7e14dc5d256fd20a57178a98b83804258c239acd7aa38f2d7d2"
|
||||
@@ -1128,7 +1125,8 @@ class WvCdmApiTest : public testing::Test {
|
||||
"d95a133bff5f57614dda5e4446cd8837901d074149dadf4b775b5b07bb88ca20");
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
// WHAT: Expected decrypted data.
|
||||
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"eff34b8d9b7b6352e7d72de991b599662aa475da355033620152e2356ebfadee"
|
||||
@@ -1181,11 +1179,12 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data.
|
||||
// Dummy encrypted data. This is a combination of clear and
|
||||
// encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
@@ -1201,7 +1200,8 @@ class WvCdmApiTest : public testing::Test {
|
||||
"d95a133bff5f57614dda5e4446cd8837901d074149dadf4b775b5b07bb88ca20");
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
// WHAT: Expected decrypted data.
|
||||
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
@@ -1259,11 +1259,11 @@ class WvCdmApiTest : public testing::Test {
|
||||
data.is_encrypted = true;
|
||||
data.is_secure = false;
|
||||
|
||||
// WHAT: Key ID of key used to encrypt the test content.
|
||||
// WHY: This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("92D20D250D425ABD992AF42E4CD64165");
|
||||
// Key ID of key used to encrypt the test content.
|
||||
// This is used by the secure layer to look up the content key
|
||||
data.key_id = wvcdm::a2bs_hex("E02562E04CD55351B14B3D748D36ED8E");
|
||||
|
||||
// WHAT: Dummy encrypted data.
|
||||
// Dummy encrypted data.
|
||||
data.encrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"3b2cbde084973539329bd5656da22d20396249bf4a18a51c38c4743360cc9fea"
|
||||
@@ -1279,7 +1279,8 @@ class WvCdmApiTest : public testing::Test {
|
||||
"d95a133bff5f57614dda5e4446cd8837901d074149dadf4b775b5b07bb88ca20");
|
||||
data.iv = wvcdm::a2b_hex("4cca615fc013102892f91efee936639b");
|
||||
data.block_offset = 0;
|
||||
// WHAT: Expected decrypted data.
|
||||
|
||||
// Expected decrypted data.
|
||||
data.decrypt_data = wvcdm::a2b_hex(
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
"5a36c0b633b58faf22156d78fdfb608e54a8095788b2b0463ef78d030b4abf82"
|
||||
@@ -1395,7 +1396,7 @@ TEST_F(WvCdmApiTest, BaseTimerTest) {
|
||||
LOGI("Tick count is %ld\n", host_->GetTickCount());
|
||||
// We should have close to, maybe slightly less than sleep_period ticks.
|
||||
// If it ticked at all then we pass as the timer must be expriring.
|
||||
EXPECT_GE(host_->GetTickCount(), 1);
|
||||
EXPECT_GE(host_->GetTickCount(), 1U);
|
||||
CancelKeyRequest(session_id_);
|
||||
}
|
||||
|
||||
@@ -1496,7 +1497,7 @@ int main(int argc, char** argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
wvcdm::InitLogging(argc, argv);
|
||||
|
||||
wvcdm::ConfigTestEnv config(wvcdm::kGoogleLicenseServerTest);
|
||||
wvcdm::ConfigTestEnv config(wvcdm::kGooglePlayServer);
|
||||
g_client_auth.assign(config.client_auth());
|
||||
g_key_system.assign(config.key_system());
|
||||
g_wrong_key_id.assign(config.wrong_key_id());
|
||||
|
||||
Reference in New Issue
Block a user