Home
last modified time | relevance | path

Searched refs:header (Results 1 – 20 of 20) sorted by relevance

/trusty/user/app/sample/hwcrypto/keybox/
Dsrv.c60 struct keybox_resp header; member
68 .header.cmd = KEYBOX_CMD_UNWRAP | KEYBOX_CMD_RSP_BIT, in keybox_handle_unwrap()
73 rsp.header.status = KEYBOX_STATUS_INVALID_REQUEST; in keybox_handle_unwrap()
80 rsp.header.status = KEYBOX_STATUS_INVALID_REQUEST; in keybox_handle_unwrap()
84 rsp.header.status = KEYBOX_STATUS_INVALID_REQUEST; in keybox_handle_unwrap()
88 rsp.header.status = keybox_unwrap( in keybox_handle_unwrap()
91 if (rsp.header.status != KEYBOX_STATUS_SUCCESS) { in keybox_handle_unwrap()
99 return tipc_send1(chan, &rsp, sizeof(rsp.header)); in keybox_handle_unwrap()
103 struct keybox_req header; member
113 rc = tipc_recv1(ctx->chan, sizeof(req.header), &req, sizeof(req)); in keybox_handle_msg()
[all …]
/trusty/user/app/storage/rpmb_dev/
Dmain.c150 memset(&s.header, 0, sizeof(s.header)); in main()
166 s.header.max_block = atoi(optarg) - 1; in main()
170 for (size_t i = 0; i < sizeof(s.header.key.byte); i++) { in main()
174 s.header.key.byte[i] = strtol(optarg, &optarg, 16); in main()
175 s.header.key_programmed = 1; in main()
216 if (s.header.max_block == 0) { in main()
217 s.header.max_block = 512 - 1; in main()
219 ret = write(s.data_fd, &s.header, sizeof(s.header)); in main()
220 if (ret != sizeof(s.header)) { in main()
229 ret = read(s.data_fd, &s.header, sizeof(s.header)); in main()
[all …]
Drpmb_dev.c91 int pos = addr * RPMB_PACKET_DATA_SIZE + sizeof(s->header); in rpmb_file_seek()
103 if (s->header.key_programmed) { in rpmb_dev_program_key()
107 s->header.key = s->cmd[0].key_mac; in rpmb_dev_program_key()
108 s->header.key_programmed = 1; in rpmb_dev_program_key()
116 ret = write(s->data_fd, &s->header, sizeof(s->header)); in rpmb_dev_program_key()
117 if (ret != sizeof(s->header)) { in rpmb_dev_program_key()
137 s->res[0].write_counter = rpmb_u32(s->header.write_counter); in rpmb_dev_get_counter()
157 if (s->header.write_counter == MAX_WRITE_COUNTER) { in rpmb_dev_data_write()
165 if (s->header.write_counter != write_counter) { in rpmb_dev_data_write()
169 write_counter, s->header.write_counter); in rpmb_dev_data_write()
[all …]
Drpmb_dev.h36 struct rpmb_data_header header; member
/trusty/user/base/lib/keybox/client/
Dclient.c28 struct keybox_req header; member
33 struct keybox_resp header; member
50 req.header.cmd = KEYBOX_CMD_UNWRAP; in keybox_unwrap()
51 req.header.reserved = 0; in keybox_unwrap()
67 rc = tipc_recv2(chan, sizeof(rsp.header), &rsp, sizeof(rsp), in keybox_unwrap()
73 if (rsp.header.status != KEYBOX_STATUS_SUCCESS) { in keybox_unwrap()
74 rc = rsp.header.status; in keybox_unwrap()
/trusty/user/base/lib/hwkey/
Dhwkey.c124 uint32_t cmd_sent = msg->header.cmd; in send_req()
150 if (msg->header.cmd != (cmd_sent | HWKEY_RESP_BIT)) { in send_req()
152 msg->header.cmd, cmd_sent); in send_req()
157 return hwkey_err_to_tipc_err(msg->header.status); in send_req()
181 .header.cmd = HWKEY_GET_KEYSLOT, in hwkey_get_keyslot_data()
200 .header.cmd = HWKEY_DERIVE, in hwkey_derive()
257 .header.cmd = HWKEY_DERIVE_VERSIONED, in hwkey_derive_versioned()
291 if (resp_msg.header.cmd != (req_msg.header.cmd | HWKEY_RESP_BIT)) { in hwkey_derive_versioned()
293 resp_msg.header.cmd, req_msg.header.cmd); in hwkey_derive_versioned()
297 if (resp_msg.header.status == HWKEY_NO_ERROR && in hwkey_derive_versioned()
[all …]
/trusty/hardware/nxp/app/hwcrypto/
Dhwkey_srv.c112 rsp_msg->header.cmd |= HWKEY_RESP_BIT; in hwkey_send_rsp()
151 msg->header.status = _handle_slots(ctx, slot_id, key_slots, key_slot_cnt, in hwkey_handle_get_keyslot_cmd()
155 if (msg->header.status == HWKEY_ERR_NOT_FOUND) { in hwkey_handle_get_keyslot_cmd()
157 msg->header.status = _handle_slots(ctx, slot_id, test_key_slots, in hwkey_handle_get_keyslot_cmd()
187 msg->header.status = derive_key_v1(&ctx->uuid, ikm_data, ikm_len, in hwkey_handle_derive_key_cmd()
194 msg->header.status = HWKEY_ERR_NOT_IMPLEMENTED; in hwkey_handle_derive_key_cmd()
224 switch (msg.header.cmd) { in hwkey_chan_handle_msg()
236 TLOGE("Unsupported request: %d\n", (int)msg.header.cmd); in hwkey_chan_handle_msg()
237 msg.header.status = HWKEY_ERR_NOT_IMPLEMENTED; in hwkey_chan_handle_msg()
/trusty/user/base/lib/system_state/rust/src/
Dlib.rs142 let header = system_state_req { in get_flag() localVariable
148 Self(header, payload) in get_flag()
190 let header = unsafe { &*(bytes.as_ptr() as *const system_state_resp) }; in deserialize() localVariable
191 match header.cmd { in deserialize()
202 unsafe { &*(header.payload.as_ptr() as *const system_state_get_flag_resp) }; in deserialize()
/trusty/user/base/interface/hwkey/include/interface/hwkey/
Dhwkey.h174 struct hwkey_msg_header header; member
287 struct hwkey_msg_header header; member
/trusty/user/app/sample/hwcryptohal/server/
Dservice_encryption_key.rs141 let cose_header_rest = &value.header.rest; in try_from()
295 let header = EncryptionHeader::generate(); in header_encryption_decryption() localVariable
296 expect!(header.is_ok(), "couldn't generate header"); in header_encryption_decryption()
297 let header = header.unwrap(); in header_encryption_decryption() localVariable
298 let encrypted_content = header.encrypt_content_service_encryption_key( in header_encryption_decryption()
313 header.key_derivation_context, in header_encryption_decryption()
318 header.header_version, in header_encryption_decryption()
Dhwcrypto_device_key.rs79 header: Option<EncryptionHeader>, field
88 let header = Some(EncryptionHeader::generate()?); in new_current() localVariable
90 Ok(VersionContext { uuid, version, header }) in new_current()
136 version_context.header = Some(version_ctx_header); in decrypt_context()
141 let header = self.header.take().ok_or(hwcrypto_err!(BAD_PARAMETER, "no header found"))?; in encrypt_context() localVariable
142 header.encrypt_content_service_encryption_key(DEVICE_KEY_CTX, self) in encrypt_context()
191 Ok(VersionContext { uuid, version, header: None }) in from_cbor_value()
/trusty/user/app/storage/test/storage_host_test/
Dstorageproxy_shim.c106 if (rpmb_state.header.max_block == 0) { in init_rpmb_state()
107 rpmb_state.header.max_block = HOST_TEST_RPMB_SIZE - 1; in init_rpmb_state()
109 rc = write(rpmb_state.data_fd, &rpmb_state.header, in init_rpmb_state()
110 sizeof(rpmb_state.header)); in init_rpmb_state()
111 if (rc != sizeof(rpmb_state.header)) { in init_rpmb_state()
/trusty/user/base/lib/hwkey/rust/src/
Dlib.rs129 header: hwkey_msg_header { cmd, op_id: 0u32, status: 0 }, in get_keyslot_data()
214 header: hwkey_msg_header { cmd, op_id: 0u32, status: 0u32 }, in derive()
529 serializer.serialize_as_bytes(&self.msg.header)?; in serialize()
553 serializer.serialize_as_bytes(&self.msg.header)?; in serialize()
600 status: msg.header.status, in deserialize()
601 cmd: msg.header.cmd, in deserialize()
646 cmd: msg.header.cmd, in deserialize()
647 status: msg.header.status, in deserialize()
/trusty/user/base/lib/hwbcc/rust/src/
Dlib.rs99 header: BccMsgHeader, field
112 header: BccMsgHeader, in new()
118 header, in new()
133 self.header.serialize(serializer)?; in serialize()
178 let (header, payload) = bytes.split_at(header_size); in deserialize()
179 let (prefix, header_body, _) = unsafe { header.align_to::<hwbcc_resp_hdr>() }; in deserialize()
/trusty/user/base/make/
Dgen_manifest.mk81 …NIFEST) $(MANIFEST_OVERLAY)) -o $@ $(addprefix -c,$(CONFIG_CONSTANTS)) --header-dir $(HEADER_DIR) \
103 $(NOECHO)$(PY3) $(MANIFEST_COMPILER) $(addprefix -c,$(CONFIG_CONSTANTS)) --header-dir $(HEADER_DIR)
Dlibrary.mk307 …UT_HEADERS := $(foreach header,$(MODULE_SDK_HEADERS),$(TRUSTY_SDK_INCLUDE_DIR)/$(MODULE_SDK_HEADER…
/trusty/user/app/sample/hwcrypto/
Dhwkey_srv.c119 rsp_hdr->header.cmd |= HWKEY_RESP_BIT; in hwkey_send_rsp()
325 hdr->header.status = _handle_slots(ctx, slot_id, key_slots, key_slot_cnt, in hwkey_handle_get_keyslot_cmd()
374 hdr->header.status = HWKEY_ERR_BAD_LEN; in hwkey_handle_derive_key_cmd()
378 hdr->header.status = hwkey_handle_derive_key_impl( in hwkey_handle_derive_key_cmd()
497 msg->header.status = status; in hwkey_handle_derive_versioned_key_cmd()
498 msg->header.cmd |= HWKEY_RESP_BIT; in hwkey_handle_derive_versioned_key_cmd()
/trusty/user/base/sdk/
DREADME.md22 particular SDK library. See header comments in this file for more details.
/trusty/kernel/lib/syscall/
DREADME58 functions for userspace in GNU assembler syntax and a C header file with
/trusty/user/base/tools/
Dmanifest_compiler.py222 def __init__(self, constants, header): argument
224 self.header = header
1166 header_file = os.path.join(header_dir, const_config.header)