Searched refs:shdr (Results 1 – 8 of 8) sorted by relevance
/optee_os-3.20.0/core/crypto/ |
A D | signed_hdr.c | 23 struct shdr *shdr; in shdr_alloc_and_copy() local 39 if (!shdr) in shdr_alloc_and_copy() 45 free(shdr); in shdr_alloc_and_copy() 49 return shdr; in shdr_alloc_and_copy() 58 TEE_Result shdr_verify_signature(const struct shdr *shdr) in shdr_verify_signature() argument 99 shdr->hash_size, SHDR_GET_HASH(shdr), shdr->hash_size, in shdr_verify_signature() 100 SHDR_GET_SIG(shdr), shdr->sig_size); in shdr_verify_signature() 283 memcmp(digest, SHDR_GET_HASH(shdr), shdr->hash_size)) { in shdr_load_pub_key() 346 const struct shdr *shdr) in shdr_verify_signature2() argument 373 SHDR_GET_HASH(shdr), shdr->hash_size, in shdr_verify_signature2() [all …]
|
/optee_os-3.20.0/core/include/ |
A D | signed_hdr.h | 34 struct shdr { struct 53 static inline size_t shdr_get_size(const struct shdr *shdr) in shdr_get_size() argument 55 size_t s = sizeof(*shdr); in shdr_get_size() 57 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size() 58 ADD_OVERFLOW(s, shdr->sig_size, &s)) in shdr_get_size() 65 #define SHDR_GET_HASH(x) (uint8_t *)(((struct shdr *)(x)) + 1) 193 static inline void shdr_free(struct shdr *shdr) in shdr_free() argument 195 free(shdr); in shdr_free() 210 TEE_Result shdr_load_pub_key(const struct shdr *shdr, size_t offs, 216 const struct shdr *shdr); [all …]
|
/optee_os-3.20.0/core/pta/ |
A D | secstor_ta_mgmt.c | 40 static TEE_Result install_ta(struct shdr *shdr, const uint8_t *nw, in install_ta() argument 52 if (shdr->img_type != SHDR_BOOTSTRAP_TA) in install_ta() 58 if (shdr->hash_size > buf_size) in install_ta() 70 TEE_DIGEST_HASH_TO_ALGO(shdr->algo)); in install_ta() 76 res = crypto_hash_update(hash_ctx, (uint8_t *)shdr, sizeof(*shdr)); in install_ta() 80 offs = SHDR_GET_SIZE(shdr); in install_ta() 121 if (consttime_memcmp(buf, SHDR_GET_HASH(shdr), shdr->hash_size)) { in install_ta() 143 struct shdr *shdr; in bootstrap() local 154 if (!shdr) in bootstrap() 157 res = shdr_verify_signature(shdr); in bootstrap() [all …]
|
/optee_os-3.20.0/core/kernel/ |
A D | ree_fs_ta.c | 64 struct shdr *shdr; /* Verified secure copy of @nw_ta's signed header */ member 239 struct shdr *shdr = NULL; in ree_fs_ta_open() local 264 if (!shdr) { in ree_fs_ta_open() 314 shdr_free(shdr); in ree_fs_ta_open() 317 if (shdr) { in ree_fs_ta_open() 338 if (shdr->img_type != SHDR_TA && shdr->img_type != SHDR_BOOTSTRAP_TA && in ree_fs_ta_open() 371 res = crypto_hash_update(hash_ctx, (uint8_t *)shdr, sizeof(*shdr)); in ree_fs_ta_open() 476 handle->shdr = shdr; in ree_fs_ta_open() 490 shdr_free(shdr); in ree_fs_ta_open() 518 memcpy(tag, SHDR_GET_HASH(handle->shdr), handle->shdr->hash_size); in ree_fs_ta_get_tag() [all …]
|
/optee_os-3.20.0/ldelf/ |
A D | ta_elf_rel.c | 338 Elf32_Shdr *shdr = elf->shdr; in e32_relocate() local 370 shdr[sym_tab_idx].sh_addr); in e32_relocate() 391 shdr[str_tab_idx].sh_addr); in e32_relocate() 398 shdr[rel_sidx].sh_size, &sh_end)) in e32_relocate() 578 Elf64_Shdr *shdr = elf->shdr; in e64_relocate() local 610 shdr[sym_tab_idx].sh_addr); in e64_relocate() 631 shdr[str_tab_idx].sh_addr); in e64_relocate() 739 Elf32_Shdr *shdr = elf->shdr; in ta_elf_relocate() local 742 if (shdr[n].sh_type == SHT_REL) in ta_elf_relocate() 745 Elf64_Shdr *shdr = elf->shdr; in ta_elf_relocate() local [all …]
|
A D | ta_elf.c | 300 Elf32_Shdr *shdr = elf->shdr; in save_hashtab() local 306 if (shdr[n].sh_type == SHT_HASH) { in save_hashtab() 314 Elf64_Shdr *shdr = elf->shdr; in save_hashtab() local 398 Elf32_Shdr *shdr = elf->shdr; in e32_save_symtab() local 422 Elf64_Shdr *shdr = elf->shdr; in e64_save_symtab() local 432 shdr[tab_idx].sh_size); in e64_save_symtab() 453 Elf32_Shdr *shdr = elf->shdr; in save_symtab() local 462 Elf64_Shdr *shdr = elf->shdr; in save_symtab() local 1103 elf->shdr = malloc(sz); in copy_section_headers() 1104 if (!elf->shdr) in copy_section_headers() [all …]
|
A D | ta_elf.h | 50 void *shdr; member
|
/optee_os-3.20.0/scripts/ |
A D | sign_encrypt.py | 369 self.shdr = struct.pack('<IIIIHH', SHDR_MAGIC, img_type, len(self.img), 378 h.update(self.shdr) 477 self.shdr = self.inf[offs:offs + SHDR_SIZE] 479 sig_size] = struct.unpack('<IIIIHH', self.shdr) 652 shdr = self.inf[offs:offs + SHDR_SIZE] 654 sig_size] = struct.unpack('<IIIIHH', shdr) 811 f.write(self.shdr)
|
Completed in 16 milliseconds