Lines Matching refs:cert
96 struct hvb_cert *cert, const char *const *hash_ptn_list, in hash_image_init_desc() argument
102 struct hvb_buf salt_buf = {cert->hash_payload.salt, cert->salt_size}; in hash_image_init_desc()
103 struct hvb_buf digest_buf = {cert->hash_payload.digest, cert->digest_size}; in hash_image_init_desc()
106 enum hvb_image_type image_type = (enum hvb_image_type)cert->verity_type; in hash_image_init_desc()
113 image_buf.size = cert->image_original_len; in hash_image_init_desc()
132 ret = hvb_compare_hash(&digest_buf, &image_buf, &salt_buf, cert->hash_algo); in hash_image_init_desc()
173 static enum hvb_errno _hvb_cert_payload_parser(struct hvb_cert *cert, uint8_t **p, uint8_t *end) in _hvb_cert_payload_parser() argument
176 struct hash_payload *payload = &cert->hash_payload; in _hvb_cert_payload_parser()
178 if (!_decode_octets(&buf, cert->salt_size, p, end)) { in _hvb_cert_payload_parser()
184 if (!_decode_octets(&buf, cert->digest_size, p, end)) { in _hvb_cert_payload_parser()
193 static enum hvb_errno _hvb_cert_signature_parser(struct hvb_cert *cert, uint8_t **p, uint8_t *end) in _hvb_cert_signature_parser() argument
196 struct hvb_sign_info *sign_info = &cert->signature_info; in _hvb_cert_signature_parser()
203 hvb_memcpy(&cert->signature_info, buf.addr, cp_size); in _hvb_cert_signature_parser()
222 enum hvb_errno hvb_cert_parser(struct hvb_cert *cert, struct hvb_buf *cert_buf) in hvb_cert_parser() argument
236 hvb_memcpy(cert, buf.addr, buf.size); in hvb_cert_parser()
239 ret = _hvb_cert_payload_parser(cert, &p, end); in hvb_cert_parser()
246 ret = _hvb_cert_signature_parser(cert, &p, end); in hvb_cert_parser()
354 static enum hvb_errno _check_rollback_index(struct hvb_ops *ops, struct hvb_cert *cert, struct hvb_… in _check_rollback_index() argument
358 uint64_t cert_rollback_index = cert->rollback_index; in _check_rollback_index()
359 uint64_t rollback_location = cert->rollback_location; in _check_rollback_index()
387 struct hvb_cert cert = {0}; in cert_init_desc() local
389 struct hvb_sign_info *sign_info = &cert.signature_info; in cert_init_desc()
391 ret = hvb_cert_parser(&cert, cert_buf); in cert_init_desc()
399 ret = hvb_verify_cert(&tbs, sign_info, cert.salt_size); in cert_init_desc()
405 ret = _check_rollback_index(ops, &cert, vd); in cert_init_desc()
411 ret = hash_image_init_desc(ops, ptn, &cert, hash_ptn_list, vd); in cert_init_desc()