Source release 14.2.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "oemcrypto_session_tests_helper.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "oec_test_data.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace wvoec;
|
||||
@@ -81,10 +82,10 @@ void SessionUtil::CreateWrappedRSAKey(uint32_t allowed_schemes,
|
||||
}
|
||||
}
|
||||
|
||||
void SessionUtil::InstallKeybox(const wvcdm_test_auth::WidevineKeybox& keybox,
|
||||
void SessionUtil::InstallKeybox(const wvoec::WidevineKeybox& keybox,
|
||||
bool good) {
|
||||
uint8_t wrapped[sizeof(wvcdm_test_auth::WidevineKeybox)];
|
||||
size_t length = sizeof(wvcdm_test_auth::WidevineKeybox);
|
||||
uint8_t wrapped[sizeof(wvoec::WidevineKeybox)];
|
||||
size_t length = sizeof(wvoec::WidevineKeybox);
|
||||
keybox_ = keybox;
|
||||
ASSERT_EQ(
|
||||
OEMCrypto_SUCCESS,
|
||||
@@ -101,15 +102,7 @@ void SessionUtil::InstallKeybox(const wvcdm_test_auth::WidevineKeybox& keybox,
|
||||
void SessionUtil::EnsureTestKeys() {
|
||||
switch (global_features.derive_key_method) {
|
||||
case DeviceFeatures::LOAD_TEST_KEYBOX:
|
||||
keybox_ = wvcdm_test_auth::kTestKeybox;
|
||||
/* Note: If you are upgrading from an older version, it may be easier to
|
||||
* force the following condition. This uses the same test keybox as we
|
||||
* used in older versions of this test.
|
||||
*/
|
||||
if (global_features.api_version < 14) {
|
||||
keybox_ = wvcdm_test_auth::kValidKeybox01;
|
||||
}
|
||||
|
||||
keybox_ = kTestKeybox;
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS,
|
||||
OEMCrypto_LoadTestKeybox(
|
||||
reinterpret_cast<const uint8_t*>(&keybox_),
|
||||
@@ -118,12 +111,8 @@ void SessionUtil::EnsureTestKeys() {
|
||||
case DeviceFeatures::LOAD_TEST_RSA_KEY:
|
||||
ASSERT_EQ(OEMCrypto_SUCCESS, OEMCrypto_LoadTestRSAKey());
|
||||
break;
|
||||
case DeviceFeatures::EXISTING_TEST_KEYBOX:
|
||||
// already has old test keybox.
|
||||
keybox_ = wvcdm_test_auth::kValidKeybox01;
|
||||
break;
|
||||
case DeviceFeatures::FORCE_TEST_KEYBOX:
|
||||
keybox_ = wvcdm_test_auth::kTestKeybox;
|
||||
keybox_ = kTestKeybox;
|
||||
InstallKeybox(keybox_, true);
|
||||
break;
|
||||
case DeviceFeatures::TEST_PROVISION_30:
|
||||
|
||||
Reference in New Issue
Block a user