Source release 18.1.0
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "oec_key_deriver.h"
|
||||
#include "oec_session_util.h"
|
||||
#include "oec_test_data.h"
|
||||
#include "oemcrypto_basic_test.h"
|
||||
#include "oemcrypto_session_tests_helper.h"
|
||||
#include "oemcrypto_types.h"
|
||||
#include "platform.h"
|
||||
@@ -140,19 +141,6 @@ constexpr size_t kInitialOtaKeyboxRequestSize = 8 * 1024; // 8 kB.
|
||||
// |use_test_key| parameter of OEMCrypto_GenerateOTARequest() is true.
|
||||
constexpr uint32_t kUseTestKey = 1;
|
||||
|
||||
// TODO(fredgc): duplicate code. Move to common util package.
|
||||
// Return a printable string from data. If all the characters are printable,
|
||||
// then just use the string. Otherwise, convert to hex.
|
||||
std::string MaybeHex(const uint8_t* data, size_t length) {
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
if (!isprint(data[i])) return "0x" + wvutil::HexEncode(data, length);
|
||||
}
|
||||
return std::string(reinterpret_cast<const char*>(data), length);
|
||||
}
|
||||
std::string MaybeHex(const std::vector<uint8_t>& data) {
|
||||
return MaybeHex(data.data(), data.size());
|
||||
}
|
||||
|
||||
std::vector<uint8_t> GetModelKey(const std::vector<uint8_t>& device_id) {
|
||||
std::vector<uint8_t> keymint_key(
|
||||
TestKeyPKCS8, TestKeyPKCS8 + wvutil::ArraySize(TestKeyPKCS8));
|
||||
|
||||
Reference in New Issue
Block a user