Add Device info validator to oemcrypto util and unit tests
Validator that can parse and validate device info Cbor object. This is to support better prov40 unit tests regarding OEMCrypto_GetDeviceInformation() later. Test: opk_ta_p40 Bug: 300304834 Change-Id: Ic260a6626dffcbef5d6b386263839499f83a69db
This commit is contained in:
@@ -68,6 +68,12 @@ class CborValidator {
|
||||
// Writes validation output |msg| to |validate_messages_|, and updates
|
||||
// |message_status_| if the |status| is more severe than the current value.
|
||||
void AddValidationMessage(CborMessageStatus status, const std::string& msg);
|
||||
static const cppbor::Item* GetMapEntry(const cppbor::Map& map,
|
||||
const std::string& entry_name);
|
||||
// Checks whether an entry with |entry_name| and |major_type| exists in |map|.
|
||||
static std::string CheckMapEntry(const cppbor::Map& map,
|
||||
cppbor::MajorType major_type,
|
||||
const std::string& entry_name);
|
||||
CborMessageStatus message_status_ = kCborUninitialized;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user