/base/startup/hvb/libhvb/src/footer/ |
D | hvb_footer.c | 47 …m hvb_errno _load_and_parse_footer(struct hvb_ops *ops, struct hvb_footer *footer, const char *ptn) in _load_and_parse_footer() argument 55 …io_ret = ops->read_partition(ops, ptn, -HVB_FOOTER_SIZE, HVB_FOOTER_SIZE, footer_buf.addr, &read_b… in _load_and_parse_footer() 57 hvb_printv(ptn, ": error, loading data.\n", NULL); in _load_and_parse_footer() 62 hvb_printv(ptn, ": Read incorrect number of bytes.\n", NULL); in _load_and_parse_footer() 68 hvb_printv(ptn, ": No footer detected,.\n", NULL); in _load_and_parse_footer() 75 static enum hvb_errno _load_cert(struct hvb_ops *ops, struct hvb_buf *cert, const char *ptn, struct… in _load_cert() argument 81 io_ret = ops->read_partition(ops, ptn, offset, cert->size, cert->addr, &read_bytes); in _load_cert() 83 hvb_printv(ptn, ": error loading signature data.\n", NULL); in _load_cert() 88 hvb_printv(ptn, ": Read incorrect number of bytes from.\n", NULL); in _load_cert() 95 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_l… in footer_init_desc() argument [all …]
|
/base/startup/hvb/libhvb/src/auth/ |
D | hvb.c | 70 static enum hvb_errno hvb_rvt_verify_root(struct hvb_ops *ops, const char *ptn, in hvb_rvt_verify_root() argument 79 ret = footer_init_desc(ops, ptn, ptn_list, &cert_pubk, vd); in hvb_rvt_verify_root() 81 hvb_printv("error verity partition: ", ptn, "\n", NULL); in hvb_rvt_verify_root() 102 static struct hvb_buf *hvb_get_partition_image(struct hvb_verified_data *vd, const char *ptn) in hvb_get_partition_image() argument 104 uint32_t name_len = hvb_strlen(ptn); in hvb_get_partition_image() 109 if (hvb_memcmp(ptn, p->partition_name, name_len) == 0) in hvb_get_partition_image() 181 char const **ptn = NULL; in hash_ptn_list_add_rvt() local 192 ptn = (char const **)hvb_calloc(num_parttions * sizeof(char *)); in hash_ptn_list_add_rvt() 193 if (ptn == NULL) { in hash_ptn_list_add_rvt() 199 ptn[n] = hash_ptn_list[n]; in hash_ptn_list_add_rvt() [all …]
|
/base/startup/hvb/libhvb/include/ |
D | hvb_ops.h | 40 enum hvb_io_errno (*read_partition)(struct hvb_ops *ops, const char *ptn, int64_t offset, 42 enum hvb_io_errno (*write_partition)(struct hvb_ops *ops, const char *ptn, int64_t offset, 53 … enum hvb_io_errno (*get_partiton_size)(struct hvb_ops *ops, const char *ptn, uint64_t *out_bytes);
|
D | hvb_footer.h | 42 enum hvb_errno footer_init_desc(struct hvb_ops *ops, const char *ptn, const char *const *hash_ptn_l…
|
D | hvb_cert.h | 154 enum hvb_errno cert_init_desc(struct hvb_ops *ops, const char *ptn, struct hvb_buf *cert_buf,
|
/base/startup/hvb/libhvb/src/cert/ |
D | hvb_cert.c | 25 static bool hvb_need_verify_hash(const char *const *hash_ptn_list, const char *ptn) in hvb_need_verify_hash() argument 28 size_t ptn_len = hvb_strlen(ptn); in hvb_need_verify_hash() 35 hvb_memcmp(hash_ptn_list[n], ptn, ptn_len) == 0) in hvb_need_verify_hash() 95 static enum hvb_errno hash_image_init_desc(struct hvb_ops *ops, const char *ptn, in hash_image_init_desc() argument 108 if (image_type != HVB_IMAGE_TYPE_HASH || !hvb_need_verify_hash(hash_ptn_list, ptn)) { in hash_image_init_desc() 109 hvb_printv(ptn, ": no need verify hash image.\n", NULL); in hash_image_init_desc() 120 io_ret = ops->read_partition(ops, ptn, 0, image_buf.size, image_buf.addr, &read_bytes); in hash_image_init_desc() 122 hvb_printv(ptn, ": Error loading data.\n", NULL); in hash_image_init_desc() 127 hvb_printv(ptn, ": Read incorrect number of bytes from.\n", NULL); in hash_image_init_desc() 134 hvb_printv(ptn, ": compare hash error.\n", NULL); in hash_image_init_desc() [all …]
|