Merge "Additional merges from cdm master"
This commit is contained in:
@@ -81,12 +81,12 @@ LOCAL_C_INCLUDES := \
|
|||||||
LOCAL_STATIC_LIBRARIES := \
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
libcdm \
|
libcdm \
|
||||||
libcdm_utils \
|
libcdm_utils \
|
||||||
|
libcrypto_static \
|
||||||
libwvlevel3 \
|
libwvlevel3 \
|
||||||
libwvdrmcryptoplugin \
|
libwvdrmcryptoplugin \
|
||||||
libwvdrmdrmplugin \
|
libwvdrmdrmplugin \
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libcrypto \
|
|
||||||
libcutils \
|
libcutils \
|
||||||
libdl \
|
libdl \
|
||||||
liblog \
|
liblog \
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#define WVCDM_CORE_DEVICE_FILES_H_
|
#define WVCDM_CORE_DEVICE_FILES_H_
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
@@ -641,7 +641,8 @@ CdmResponseType CryptoSession::Decrypt(const CdmDecryptionParameters& params) {
|
|||||||
buffer_descriptor.type =
|
buffer_descriptor.type =
|
||||||
params.is_secure ? destination_buffer_type_ : OEMCrypto_BufferType_Clear;
|
params.is_secure ? destination_buffer_type_ : OEMCrypto_BufferType_Clear;
|
||||||
|
|
||||||
if (params.is_secure && buffer_descriptor.type == OEMCrypto_BufferType_Clear) {
|
if (params.is_secure &&
|
||||||
|
buffer_descriptor.type == OEMCrypto_BufferType_Clear) {
|
||||||
return SECURE_BUFFER_REQUIRED;
|
return SECURE_BUFFER_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -330,7 +330,6 @@ bool DeviceFiles::LicenseExists(const std::string& key_set_id) {
|
|||||||
LOGW("DeviceFiles::LicenseExists: not initialized");
|
LOGW("DeviceFiles::LicenseExists: not initialized");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return FileExists(key_set_id + kLicenseFileNameExt);
|
|
||||||
return reserved_license_ids_.count(key_set_id) ||
|
return reserved_license_ids_.count(key_set_id) ||
|
||||||
FileExists(key_set_id + kLicenseFileNameExt);
|
FileExists(key_set_id + kLicenseFileNameExt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,10 +140,6 @@ CdmLicense::CdmLicense(const CdmSessionId& session_id, Clock* clock)
|
|||||||
session_id_(session_id),
|
session_id_(session_id),
|
||||||
initialized_(false),
|
initialized_(false),
|
||||||
renew_with_client_id_(false) {
|
renew_with_client_id_(false) {
|
||||||
if (NULL == clock) {
|
|
||||||
LOGE("CdmLicense::CdmLicense: clock parameter not provided");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
clock_.reset(clock);
|
clock_.reset(clock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "initialization_data.h"
|
#include "initialization_data.h"
|
||||||
#include "license_request.h"
|
#include "license_request.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "OEMCryptoCENC.h"
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "scoped_ptr.h"
|
#include "scoped_ptr.h"
|
||||||
#include "string_conversions.h"
|
#include "string_conversions.h"
|
||||||
@@ -178,6 +179,18 @@ class WvCdmEngineTest : public testing::Test {
|
|||||||
|
|
||||||
// Test that provisioning works, even if device is already provisioned.
|
// Test that provisioning works, even if device is already provisioned.
|
||||||
TEST_F(WvCdmEngineTest, ProvisioningTest) {
|
TEST_F(WvCdmEngineTest, ProvisioningTest) {
|
||||||
|
uint32_t nonce = 0;
|
||||||
|
uint8_t buffer[1];
|
||||||
|
size_t size = 0;
|
||||||
|
int result = OEMCrypto_RewrapDeviceRSAKey(
|
||||||
|
0, buffer, 0, buffer, 0, &nonce, buffer, 0, buffer, buffer, &size);
|
||||||
|
if (result == OEMCrypto_ERROR_NOT_IMPLEMENTED) {
|
||||||
|
LOGW("WARNING: Skipping ProvisioningTest because the device does not "
|
||||||
|
"support provisioning. If you are using a baked-in certificate, this "
|
||||||
|
"is expected. Otherwise, something is wrong.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Provision();
|
Provision();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
//
|
//
|
||||||
// Timer - Platform independent interface for a Timer class
|
// Timer - Platform independent interface for a Timer class
|
||||||
//
|
//
|
||||||
#ifndef CDM_BASE_CORE_TIMER_H_
|
#ifndef CDM_BASE_TIMER_H_
|
||||||
#define CDM_BASE_CORE_TIMER_H_
|
#define CDM_BASE_TIMER_H_
|
||||||
|
|
||||||
#include "wv_cdm_types.h"
|
#include "wv_cdm_types.h"
|
||||||
|
|
||||||
@@ -48,4 +48,4 @@ class Timer {
|
|||||||
|
|
||||||
} // namespace wvcdm
|
} // namespace wvcdm
|
||||||
|
|
||||||
#endif // CDM_BASE_CORE_TIMER_H_
|
#endif // CDM_BASE_TIMER_H_
|
||||||
|
|||||||
@@ -457,8 +457,8 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
|
|||||||
virtual const std::string& service_certificate() const {
|
virtual const std::string& service_certificate() const {
|
||||||
return service_certificate_;
|
return service_certificate_;
|
||||||
}
|
}
|
||||||
virtual void set_service_certificate(const std::string& service_certificate) {
|
virtual void set_service_certificate(const std::string& cert) {
|
||||||
service_certificate_ = service_certificate;
|
service_certificate_ = cert;
|
||||||
}
|
}
|
||||||
virtual bool use_privacy_mode() const { return use_privacy_mode_; }
|
virtual bool use_privacy_mode() const { return use_privacy_mode_; }
|
||||||
virtual bool is_session_sharing_enabled() const {
|
virtual bool is_session_sharing_enabled() const {
|
||||||
@@ -980,7 +980,7 @@ TEST_F(WvCdmRequestLicenseTest, PropertySetTest) {
|
|||||||
itr = query_info.find(wvcdm::QUERY_KEY_SECURITY_LEVEL);
|
itr = query_info.find(wvcdm::QUERY_KEY_SECURITY_LEVEL);
|
||||||
EXPECT_TRUE(itr != query_info.end());
|
EXPECT_TRUE(itr != query_info.end());
|
||||||
security_level = itr->second;
|
security_level = itr->second;
|
||||||
EXPECT_TRUE(security_level.empty() ||
|
EXPECT_TRUE(!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L1) ||
|
||||||
!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L3));
|
!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L3));
|
||||||
|
|
||||||
std::string app_id = "not empty";
|
std::string app_id = "not empty";
|
||||||
|
|||||||
1
libwvdrmengine/test/gmock/scripts/generator/cpp/__init__.py
Executable file → Normal file
1
libwvdrmengine/test/gmock/scripts/generator/cpp/__init__.py
Executable file → Normal file
@@ -0,0 +1 @@
|
|||||||
|
# dummy
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
* If you are ripping this out of the library, comment out the next
|
* If you are ripping this out of the library, comment out the next
|
||||||
* line and uncomment the next lines as approrpiate
|
* line and uncomment the next lines as approrpiate
|
||||||
*/
|
*/
|
||||||
//#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
/* if on motoral, sun, ibm; uncomment this */
|
/* if on motoral, sun, ibm; uncomment this */
|
||||||
/* #define WORDS_BIGENDIAN 1 */
|
/* #define WORDS_BIGENDIAN 1 */
|
||||||
|
|||||||
Reference in New Issue
Block a user