Lines Matching refs:s

28 static TEEC_Result ta_crypt_cmd_reset_operation(ADBG_Case_t *c, TEEC_Session *s,  in ta_crypt_cmd_reset_operation()  argument
39 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_RESET_OPERATION, &op, in ta_crypt_cmd_reset_operation()
49 TEEC_Session *s, in ta_crypt_cmd_copy_operation() argument
65 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_COPY_OPERATION, &op, in ta_crypt_cmd_copy_operation()
75 static TEEC_Result ta_crypt_cmd_digest_update(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_digest_update() argument
93 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_DIGEST_UPDATE, &op, &ret_orig); in ta_crypt_cmd_digest_update()
103 static TEEC_Result ta_crypt_cmd_digest_do_final(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_digest_do_final() argument
126 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_DIGEST_DO_FINAL, &op, in ta_crypt_cmd_digest_do_final()
141 TEEC_Session *s, in ta_crypt_cmd_set_operation_key2() argument
161 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_SET_OPERATION_KEY2, &op, in ta_crypt_cmd_set_operation_key2()
172 static TEEC_Result ta_crypt_cmd_mac_init(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_mac_init() argument
194 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_MAC_INIT, &op, &ret_orig); in ta_crypt_cmd_mac_init()
204 static TEEC_Result ta_crypt_cmd_mac_update(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_mac_update() argument
222 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_MAC_UPDATE, &op, &ret_orig); in ta_crypt_cmd_mac_update()
233 TEEC_Session *s, in ta_crypt_cmd_mac_final_compute() argument
257 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_MAC_FINAL_COMPUTE, &op, in ta_crypt_cmd_mac_final_compute()
272 TEEC_Session *s, in ta_crypt_cmd_mac_final_compare() argument
296 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_MAC_FINAL_COMPARE, &op, in ta_crypt_cmd_mac_final_compare()
307 static TEEC_Result ta_crypt_cmd_cipher_init(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_cipher_init() argument
330 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_CIPHER_INIT, &op, &ret_orig); in ta_crypt_cmd_cipher_init()
340 static TEEC_Result ta_crypt_cmd_cipher_update(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_cipher_update() argument
362 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_CIPHER_UPDATE, &op, &ret_orig); in ta_crypt_cmd_cipher_update()
376 TEEC_Session *s, in ta_crypt_cmd_cipher_do_final() argument
400 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_CIPHER_DO_FINAL, &op, in ta_crypt_cmd_cipher_do_final()
415 TEEC_Session *s, in ta_crypt_cmd_random_number_generate() argument
429 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_RANDOM_NUMBER_GENERATE, &op, in ta_crypt_cmd_random_number_generate()
442 static TEEC_Result ta_crypt_cmd_ae_init(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_ae_init() argument
466 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_AE_INIT, &op, &ret_orig); in ta_crypt_cmd_ae_init()
475 static TEEC_Result ta_crypt_cmd_ae_update_aad(ADBG_Case_t *c, TEEC_Session *s, in ta_crypt_cmd_ae_update_aad() argument
493 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_AE_UPDATE_AAD, &op, &ret_orig); in ta_crypt_cmd_ae_update_aad()
504 TEEC_Session *s, in ta_crypt_cmd_ae_update() argument
528 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_AE_UPDATE, &op, &ret_orig); in ta_crypt_cmd_ae_update()
542 TEEC_Session *s, in ta_crypt_cmd_ae_encrypt_final() argument
570 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_AE_ENCRYPT_FINAL, &op, in ta_crypt_cmd_ae_encrypt_final()
587 TEEC_Session *s, in ta_crypt_cmd_ae_decrypt_final() argument
614 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_AE_DECRYPT_FINAL, &op, in ta_crypt_cmd_ae_decrypt_final()
629 TEEC_Session *s, in ta_crypt_cmd_asymmetric_operate() argument
666 res = TEEC_InvokeCommand(s, cmd, &op, &ret_orig); in ta_crypt_cmd_asymmetric_operate()
681 TEEC_Session *s, in ta_crypt_cmd_asymmetric_encrypt() argument
690 return ta_crypt_cmd_asymmetric_operate(c, s, oph, in ta_crypt_cmd_asymmetric_encrypt()
697 TEEC_Session *s, in ta_crypt_cmd_asymmetric_decrypt() argument
706 return ta_crypt_cmd_asymmetric_operate(c, s, oph, in ta_crypt_cmd_asymmetric_decrypt()
713 TEEC_Session *s, in ta_crypt_cmd_asymmetric_sign() argument
722 return ta_crypt_cmd_asymmetric_operate(c, s, oph, in ta_crypt_cmd_asymmetric_sign()
728 TEEC_Session *s, in ta_crypt_cmd_asymmetric_verify() argument
764 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_ASYMMETRIC_VERIFY_DIGEST, in ta_crypt_cmd_asymmetric_verify()
777 TEEC_Session *s, in ta_crypt_cmd_get_object_value_attribute() argument
793 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_GET_OBJECT_VALUE_ATTRIBUTE, in ta_crypt_cmd_get_object_value_attribute()
810 TEEC_Session *s, in ta_crypt_cmd_generate_key() argument
837 res = TEEC_InvokeCommand(s, TA_CRYPT_CMD_GENERATE_KEY, &op, &ret_orig); in ta_crypt_cmd_generate_key()
3607 static bool create_key(ADBG_Case_t *c, TEEC_Session *s, in create_key() argument
3615 ta_crypt_cmd_allocate_transient_object(c, s, key_type, in create_key()
3620 ta_crypt_cmd_populate_transient_object(c, s, *handle, attrs, in create_key()
3632 ta_crypt_cmd_get_object_buffer_attribute(c, s, *handle, in create_key()
4189 static bool test_keygen_attributes(ADBG_Case_t *c, TEEC_Session *s, in test_keygen_attributes() argument
4203 ta_crypt_cmd_get_object_buffer_attribute(c, s, in test_keygen_attributes()
4225 ta_crypt_cmd_get_object_value_attribute(c, s, key, in test_keygen_attributes()
4233 static bool test_secret_value(ADBG_Case_t *c, TEEC_Session *s, in test_secret_value() argument
4240 return test_keygen_attributes(c, s, key, key_size, in test_secret_value()
4246 static bool test_rsa_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_rsa_key_pair() argument
4260 return test_keygen_attributes(c, s, key, key_size, in test_rsa_key_pair()
4265 static bool test_ecc_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_ecc_key_pair() argument
4275 return test_keygen_attributes(c, s, key, key_size, in test_ecc_key_pair()
4280 static bool test_dh_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_dh_key_pair() argument
4291 return test_keygen_attributes(c, s, key, check_keysize, in test_dh_key_pair()
4296 static bool test_dsa_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_dsa_key_pair() argument
4307 return test_keygen_attributes(c, s, key, key_size, in test_dsa_key_pair()
4312 static bool test_x25519_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_x25519_key_pair() argument
4320 return test_keygen_attributes(c, s, key, key_size, in test_x25519_key_pair()
4325 static bool test_ed25519_key_pair(ADBG_Case_t *c, TEEC_Session *s, in test_ed25519_key_pair() argument
4333 return test_keygen_attributes(c, s, key, key_size, in test_ed25519_key_pair()
4338 static bool generate_and_test_key(ADBG_Case_t *c, TEEC_Session *s, in generate_and_test_key() argument
4347 ta_crypt_cmd_allocate_transient_object(c, s, key_type, key_size, in generate_and_test_key()
4352 ta_crypt_cmd_generate_key(c, s, key, key_size, params, in generate_and_test_key()
4360 test_secret_value(c, s, key, in generate_and_test_key()
4372 test_secret_value(c, s, key, key_size)); in generate_and_test_key()
4377 test_rsa_key_pair(c, s, key, key_size)); in generate_and_test_key()
4383 test_ecc_key_pair(c, s, key, key_size)); in generate_and_test_key()
4388 test_dh_key_pair(c, s, key, check_keysize)); in generate_and_test_key()
4393 test_dsa_key_pair(c, s, key, key_size)); in generate_and_test_key()
4398 test_x25519_key_pair(c, s, key, key_size)); in generate_and_test_key()
4403 test_ed25519_key_pair(c, s, key, key_size)); in generate_and_test_key()
4412 ta_crypt_cmd_free_transient_object(c, s, key))) in generate_and_test_key()
5112 TEEC_Session s = { }; in xtest_tee_test_4011() local
5130 if (!ADBG_EXPECT_TEEC_SUCCESS(c, xtest_teec_open_session(&s, in xtest_tee_test_4011()
5134 &s, in, sizeof(in)))) in xtest_tee_test_4011()
5137 c, &s, TEE_TYPE_RSA_KEYPAIR, key_size, &key))) in xtest_tee_test_4011()
5139 if (!ADBG_EXPECT_TEEC_SUCCESS(c, ta_crypt_cmd_generate_key(c, &s, in xtest_tee_test_4011()
5144 if (!ADBG_EXPECT_TEEC_SUCCESS(c, ta_crypt_cmd_allocate_operation(c, &s, in xtest_tee_test_4011()
5148 if (!ADBG_EXPECT_TEEC_SUCCESS(c, ta_crypt_cmd_allocate_operation(c, &s, in xtest_tee_test_4011()
5152 if (!ADBG_EXPECT_TEEC_SUCCESS(c, ta_crypt_cmd_allocate_operation(c, &s, in xtest_tee_test_4011()
5155 if (!ADBG_EXPECT_TEEC_SUCCESS(c, ta_crypt_cmd_allocate_operation(c, &s, in xtest_tee_test_4011()
5161 ta_crypt_cmd_set_operation_key(c, &s, ops, key))) in xtest_tee_test_4011()
5164 ta_crypt_cmd_set_operation_key(c, &s, opv, key))) in xtest_tee_test_4011()
5167 ta_crypt_cmd_set_operation_key(c, &s, ope, key))) in xtest_tee_test_4011()
5170 ta_crypt_cmd_set_operation_key(c, &s, opd, key))) in xtest_tee_test_4011()
5199 ta_crypt_cmd_asymmetric_sign(c, &s, ops, NULL, 0, in xtest_tee_test_4011()
5205 ta_crypt_cmd_asymmetric_verify(c, &s, opv, NULL, 0, in xtest_tee_test_4011()
5212 ta_crypt_cmd_asymmetric_encrypt(c, &s, ope, NULL, 0, in xtest_tee_test_4011()
5247 ta_crypt_cmd_asymmetric_decrypt(c, &s, opd, NULL, 0, in xtest_tee_test_4011()
5253 ta_crypt_cmd_asymmetric_verify(c, &s, opv, NULL, 0, in xtest_tee_test_4011()
5259 TEEC_CloseSession(&s); in xtest_tee_test_4011()