Source release 19.3.0
This commit is contained in:
@@ -38,6 +38,7 @@ class DeviceFeatures {
|
||||
LOAD_TEST_RSA_KEY, // Call LoadTestRSAKey before deriving keys.
|
||||
TEST_PROVISION_30, // Device has OEM Certificate installed.
|
||||
TEST_PROVISION_40, // Device has Boot Certificate Chain installed.
|
||||
PRELOADED_RSA_KEY, // Device has test RSA key baked in.
|
||||
};
|
||||
|
||||
enum DeriveMethod derive_key_method;
|
||||
@@ -65,6 +66,16 @@ class DeviceFeatures {
|
||||
// Get a list of output types that should be tested.
|
||||
const std::vector<OutputType>& GetOutputTypes();
|
||||
|
||||
// If the device has a baked in cert, then this is the public key that should
|
||||
// be used for testing.
|
||||
const std::vector<uint8_t>& rsa_test_key() const { return rsa_test_key_; };
|
||||
void set_rsa_test_key(const std::vector<uint8_t>& rsa_test_key) {
|
||||
rsa_test_key_ = rsa_test_key;
|
||||
}
|
||||
void set_rsa_test_key(std::vector<uint8_t>&& rsa_test_key) {
|
||||
rsa_test_key_ = std::move(rsa_test_key);
|
||||
}
|
||||
|
||||
private:
|
||||
// Decide which method should be used to derive session keys, based on
|
||||
// supported featuers.
|
||||
@@ -77,6 +88,7 @@ class DeviceFeatures {
|
||||
// A list of possible output types.
|
||||
std::vector<OutputType> output_types_;
|
||||
bool initialized_ = false;
|
||||
std::vector<uint8_t> rsa_test_key_;
|
||||
};
|
||||
|
||||
// There is one global set of features for the version of OEMCrypto being
|
||||
|
||||
Reference in New Issue
Block a user