Lines Matching refs:msg
176 } __attribute__((packed)) *msg = ap_msg->message; in ICAMEX_msg_to_type6MEX_msg() local
180 if (copy_from_user(msg->text, mex->inputdata, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg()
183 if (is_PKCS11_padded(msg->text, mex->inputdatalength)) in ICAMEX_msg_to_type6MEX_msg()
187 msg->hdr = static_type6_hdr; in ICAMEX_msg_to_type6MEX_msg()
188 msg->fr = static_pke_function_and_rules; in ICAMEX_msg_to_type6MEX_msg()
190 if (is_PKCS12_padded(msg->text, mex->inputdatalength)) { in ICAMEX_msg_to_type6MEX_msg()
192 pad_len = strnlen(msg->text + 2, mex->inputdatalength - 2) + 3; in ICAMEX_msg_to_type6MEX_msg()
196 memmove(msg->text, msg->text + pad_len, vud_len); in ICAMEX_msg_to_type6MEX_msg()
197 msg->length = cpu_to_le16(vud_len + 2); in ICAMEX_msg_to_type6MEX_msg()
200 size = zcrypt_type6_mex_key_en(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg()
203 size += sizeof(*msg) + vud_len; /* total size of msg */ in ICAMEX_msg_to_type6MEX_msg()
206 msg->length = cpu_to_le16(2 + vud_len); in ICAMEX_msg_to_type6MEX_msg()
208 msg->hdr.function_code[1] = 'D'; in ICAMEX_msg_to_type6MEX_msg()
209 msg->fr.function_code[1] = 'D'; in ICAMEX_msg_to_type6MEX_msg()
212 size = zcrypt_type6_mex_key_de(mex, msg->text + vud_len, 0); in ICAMEX_msg_to_type6MEX_msg()
215 size += sizeof(*msg) + vud_len; /* total size of msg */ in ICAMEX_msg_to_type6MEX_msg()
219 msg->hdr.ToCardLen1 = (size - sizeof(msg->hdr) + 3) & -4; in ICAMEX_msg_to_type6MEX_msg()
220 msg->hdr.FromCardLen1 = PCICC_MAX_RESPONSE_SIZE - sizeof(msg->hdr); in ICAMEX_msg_to_type6MEX_msg()
222 msg->cprb = static_cprb; in ICAMEX_msg_to_type6MEX_msg()
223 msg->cprb.usage_domain[0]= AP_QID_QUEUE(zdev->ap_dev->qid); in ICAMEX_msg_to_type6MEX_msg()
224 msg->cprb.req_parml = cpu_to_le16(size - sizeof(msg->hdr) - in ICAMEX_msg_to_type6MEX_msg()
225 sizeof(msg->cprb)); in ICAMEX_msg_to_type6MEX_msg()
226 msg->cprb.rpl_parml = cpu_to_le16(msg->hdr.FromCardLen1); in ICAMEX_msg_to_type6MEX_msg()
263 } __attribute__((packed)) *msg = ap_msg->message; in ICACRT_msg_to_type6CRT_msg() local
267 msg->length = cpu_to_le16(2 + crt->inputdatalength); in ICACRT_msg_to_type6CRT_msg()
268 if (copy_from_user(msg->text, crt->inputdata, crt->inputdatalength)) in ICACRT_msg_to_type6CRT_msg()
271 if (is_PKCS11_padded(msg->text, crt->inputdatalength)) in ICACRT_msg_to_type6CRT_msg()
275 size = zcrypt_type6_crt_key(crt, msg->text + crt->inputdatalength, 0); in ICACRT_msg_to_type6CRT_msg()
278 size += sizeof(*msg) + crt->inputdatalength; /* total size of msg */ in ICACRT_msg_to_type6CRT_msg()
281 msg->hdr = static_type6_hdr; in ICACRT_msg_to_type6CRT_msg()
282 msg->hdr.ToCardLen1 = (size - sizeof(msg->hdr) + 3) & -4; in ICACRT_msg_to_type6CRT_msg()
283 msg->hdr.FromCardLen1 = PCICC_MAX_RESPONSE_SIZE - sizeof(msg->hdr); in ICACRT_msg_to_type6CRT_msg()
285 msg->cprb = static_cprb; in ICACRT_msg_to_type6CRT_msg()
286 msg->cprb.usage_domain[0] = AP_QID_QUEUE(zdev->ap_dev->qid); in ICACRT_msg_to_type6CRT_msg()
287 msg->cprb.req_parml = msg->cprb.rpl_parml = in ICACRT_msg_to_type6CRT_msg()
288 cpu_to_le16(size - sizeof(msg->hdr) - sizeof(msg->cprb)); in ICACRT_msg_to_type6CRT_msg()
290 msg->fr = static_pkd_function_and_rules; in ICACRT_msg_to_type6CRT_msg()
355 struct type86_reply *msg = reply->message; in convert_type86() local
360 service_rc = le16_to_cpu(msg->cprb.ccp_rtcode); in convert_type86()
362 service_rs = le16_to_cpu(msg->cprb.ccp_rscode); in convert_type86()
382 msg->hdr.reply_code); in convert_type86()
385 data = msg->text; in convert_type86()
386 reply_len = le16_to_cpu(msg->length) - 2; in convert_type86()
420 struct type86_reply *msg = reply->message; in convert_response() local
423 switch (msg->hdr.type) { in convert_response()
428 if (msg->hdr.reply_code) in convert_response()
430 if (msg->cprb.cprb_ver_id == 0x01) in convert_response()
453 struct ap_message *msg, in zcrypt_pcicc_receive() argument
465 memcpy(msg->message, &error_reply, sizeof(error_reply)); in zcrypt_pcicc_receive()
473 memcpy(msg->message, reply->message, length); in zcrypt_pcicc_receive()
475 memcpy(msg->message, reply->message, sizeof error_reply); in zcrypt_pcicc_receive()
477 complete((struct completion *) msg->private); in zcrypt_pcicc_receive()