avb: provide some functions used by fastboot
In the avb process, the pub_key must be verified by some permanent attributes.The permanent attributes is written by fastboot. So the write_permanent_attributes function is provided to write permanent attributes. the read_permanent_attributes functions is provided to verified the data. Change-Id: Ib448c31062e34ce7f15fc32ab141793755bacf8a Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
parent
367cce4d64
commit
b71a2499bf
|
|
@ -12,5 +12,7 @@ int read_slot_count(char *slot_count);
|
|||
int read_slot_suffixes(char *slot_suffixes);
|
||||
int set_slot_active(unsigned int *slot_number);
|
||||
int get_current_slot(char *select_slot);
|
||||
int read_permanent_attributes(uint8_t *attributes, uint32_t size);
|
||||
int write_permanent_attributes(uint8_t *attributes, uint32_t size);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -379,7 +379,20 @@ int get_current_slot(char *select_slot)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int read_permanent_attributes(uint8_t *attributes, uint32_t size)
|
||||
{
|
||||
if(trusty_read_permanent_attributes(attributes, size) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_permanent_attributes(uint8_t *attributes, uint32_t size)
|
||||
{
|
||||
if(trusty_write_permanent_attributes(attributes, size) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue