Lines Matching refs:kb
27 struct vb2_keyblock *kb; in vb2_load_fw_keyblock() local
51 kb = vb2_workbuf_alloc(&wb, sizeof(*kb)); in vb2_load_fw_keyblock()
52 if (!kb) in vb2_load_fw_keyblock()
55 rv = vb2ex_read_resource(ctx, VB2_RES_FW_VBLOCK, 0, kb, sizeof(*kb)); in vb2_load_fw_keyblock()
59 block_size = kb->keyblock_size; in vb2_load_fw_keyblock()
67 kb = vb2_workbuf_realloc(&wb, sizeof(*kb), block_size); in vb2_load_fw_keyblock()
68 if (!kb) in vb2_load_fw_keyblock()
71 rv = vb2ex_read_resource(ctx, VB2_RES_FW_VBLOCK, 0, kb, block_size); in vb2_load_fw_keyblock()
76 rv = vb2_verify_keyblock(kb, block_size, &root_key, &wb); in vb2_load_fw_keyblock()
83 if (kb->data_key.key_version > 0xffff) in vb2_load_fw_keyblock()
85 if (!rv && kb->data_key.key_version < (sd->fw_version_secdata >> 16)) in vb2_load_fw_keyblock()
92 sd->fw_version = kb->data_key.key_version << 16; in vb2_load_fw_keyblock()
101 packed_key->algorithm = kb->data_key.algorithm; in vb2_load_fw_keyblock()
102 packed_key->key_version = kb->data_key.key_version; in vb2_load_fw_keyblock()
103 packed_key->key_size = kb->data_key.key_size; in vb2_load_fw_keyblock()
112 (uint8_t*)&kb->data_key + kb->data_key.key_offset, in vb2_load_fw_keyblock()
121 sd->vblock_preamble_offset = kb->keyblock_size; in vb2_load_fw_keyblock()