app: aboot: Define helper functions for AVB 2.0
Define functions for critical lock and enforcing
verity for AVB 2.0.
Change-Id: I02f4289ded6faefb5ba549074cbba837eb653f86
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index f24bc3f..8dede9b 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -4524,11 +4524,21 @@
return;
}
+bool is_device_locked_critical()
+{
+ return device.is_unlock_critical ? false:true;
+}
+
bool is_device_locked()
{
return device.is_unlocked ? false:true;
}
+bool is_verity_enforcing()
+{
+ return device.verity_mode ? true:false;
+}
+
/* register commands and variables for fastboot */
void aboot_fastboot_register_commands(void)
{
diff --git a/include/platform.h b/include/platform.h
index bce5970..b33399d 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -100,4 +100,6 @@
int get_userkey(uint8_t **user_key, uint32_t *user_key_size);
int erase_userkey();
int store_userkey(uint8_t *user_key, uint32_t user_key_size);
+bool is_device_locked_critical();
+bool is_verity_enforcing();
#endif