Additional merges from cdm master
* Update unit test make files to use BoringSSL [ Merge of http://go/wvgerrit/14173 ] This CL updates the android makefiles to use the libcrypto_static. * Do Not Run Provisioning Tests On Devices Without Keyboxes [ Merge of http://go/wvgerrit/15633 ] The provisioning tests outside OEMCrypto were failing on devices that use baked-in certificates because only OEMCrypto knows that the cert is baked in and the device cannot be reprovisioned. This change skips those two tests if the device says it does not implement rewrapping the cert. (i.e. it does not implement provisioning) Bug: 23554998 * Add new third-party libs (protobuf & gyp) [ Merge of http://go/wvgerrit/14717 ] The CE CDM used to expect these to be installed system-wide, which creates challenges for integrators who must cross-compile the CDM. These are now used in source form from third_party. Change-Id: I29cca2f9415fe2fafdf948273e5a0f5d7de50285
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "initialization_data.h"
|
||||
#include "license_request.h"
|
||||
#include "log.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "properties.h"
|
||||
#include "scoped_ptr.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_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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user