Home
last modified time | relevance | path

Searched refs:tcti_ctx (Results 1 – 14 of 14) sorted by relevance

/external/tpm2-tss/test/integration/
Dsapi-context-util.c35 TSS2_TCTI_CONTEXT *tcti_ctx; in tcti_device_init() local
44 tcti_ctx = (TSS2_TCTI_CONTEXT *) calloc(1, size); in tcti_device_init()
45 if (tcti_ctx == NULL) { in tcti_device_init()
51 rc = Tss2_Tcti_Device_Init(tcti_ctx, &size, device_path); in tcti_device_init()
54 free(tcti_ctx); in tcti_device_init()
57 return tcti_ctx; in tcti_device_init()
73 TSS2_TCTI_CONTEXT *tcti_ctx; in tcti_socket_init() local
83 tcti_ctx = (TSS2_TCTI_CONTEXT *) calloc(1, size); in tcti_socket_init()
84 if (tcti_ctx == NULL) { in tcti_socket_init()
89 rc = Tss2_Tcti_Mssim_Init(tcti_ctx, &size, conf_str); in tcti_socket_init()
[all …]
Dsapi-hmac-auth.int.c43 TSS2_TCTI_CONTEXT *tcti_ctx; in create_policy() local
45 rc = Tss2_Sys_GetTctiContext (sys_ctx, &tcti_ctx); in create_policy()
46 if (rc != TSS2_RC_SUCCESS || tcti_ctx == NULL) { in create_policy()
61 tcti_ctx); in create_policy()
119 TSS2_TCTI_CONTEXT *tcti_ctx; in nv_rw_with_session() local
144 rc = Tss2_Sys_GetTctiContext (sys_ctx, &tcti_ctx); in nv_rw_with_session()
145 if (rc != TSS2_RC_SUCCESS || tcti_ctx == NULL) { in nv_rw_with_session()
175 rc = tpm_handle_to_name (tcti_ctx, in nv_rw_with_session()
199 tcti_ctx); in nv_rw_with_session()
212 rc = tpm_handle_to_name (tcti_ctx, in nv_rw_with_session()
Dsapi-nv-policy-locality.int.c209 TSS2_TCTI_CONTEXT *tcti_ctx; in nv_write_test() local
213 rc = Tss2_Sys_GetTctiContext (sys_ctx, &tcti_ctx); in nv_write_test()
219 rc = Tss2_Tcti_SetLocality (tcti_ctx, locality); in nv_write_test()
255 TSS2_TCTI_CONTEXT *tcti_ctx; in nv_read_test() local
266 rc = Tss2_Sys_GetTctiContext (sys_ctx, &tcti_ctx); in nv_read_test()
272 rc = Tss2_Tcti_SetLocality (tcti_ctx, locality); in nv_read_test()
287 rc = Tss2_Tcti_SetLocality (tcti_ctx, 3); in nv_read_test()
Dsapi-param-encrypt-decrypt.int.c32 TSS2_TCTI_CONTEXT *tcti_ctx; in test_invoke() local
62 rc = Tss2_Sys_GetTctiContext(sapi_context, &tcti_ctx); in test_invoke()
89 &symmetric, TPM2_ALG_SHA256, tcti_ctx); in test_invoke()
Dcontext-util.h23 TSS2_SYS_CONTEXT *sapi_init_from_tcti_ctx(TSS2_TCTI_CONTEXT * tcti_ctx);
/external/tpm2-tss/test/fuzz/tcti/
Dtcti-fuzzing.c106 tcti_fuzzing_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx) in tcti_fuzzing_context_cast() argument
108 if (tcti_ctx != NULL && TSS2_TCTI_MAGIC (tcti_ctx) == TCTI_FUZZING_MAGIC) { in tcti_fuzzing_context_cast()
109 return (TSS2_TCTI_FUZZING_CONTEXT*)tcti_ctx; in tcti_fuzzing_context_cast()
129 TSS2_TCTI_CONTEXT *tcti_ctx, in tcti_fuzzing_transmit() argument
133 (void) tcti_ctx; in tcti_fuzzing_transmit()
136 ((TSS2_TCTI_FUZZING_CONTEXT*) tcti_ctx)->common.state = TCTI_STATE_RECEIVE; in tcti_fuzzing_transmit()
142 TSS2_TCTI_CONTEXT *tcti_ctx) in tcti_fuzzing_cancel() argument
144 (void) tcti_ctx; in tcti_fuzzing_cancel()
150 TSS2_TCTI_CONTEXT *tcti_ctx, in tcti_fuzzing_set_locality() argument
153 (void) tcti_ctx; in tcti_fuzzing_set_locality()
[all …]
Dtss2_tcti_fuzzing.h16 TSS2_TCTI_CONTEXT *tcti_ctx,
Dtcti-fuzzing.h25 tcti_fuzzing_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx);
/external/tpm2-tss/test/unit/
Dtctildr-nodl.c62 TSS2_TCTI_CONTEXT *tcti_ctx = NULL; in test_tctildr_get_default_all_fail() local
65 will_return (__wrap_tcti_from_init, tcti_ctx); in test_tctildr_get_default_all_fail()
67 will_return (__wrap_tcti_from_init, tcti_ctx); in test_tctildr_get_default_all_fail()
70 will_return (__wrap_tcti_from_init, tcti_ctx); in test_tctildr_get_default_all_fail()
73 rc = tctildr_get_default (&tcti_ctx, NULL); in test_tctildr_get_default_all_fail()
89 TSS2_TCTI_CONTEXT *tcti_ctx = NULL; in test_get_tcti_default_success() local
93 rc = tctildr_get_tcti (NULL, NULL, &tcti_ctx, NULL); in test_get_tcti_default_success()
95 assert_ptr_equal (tcti_ctx, &test_ctx); in test_get_tcti_default_success()
101 TSS2_TCTI_CONTEXT *tcti_ctx = NULL; in test_get_tcti_match_second() local
105 rc = tctildr_get_tcti ("libtss2-tcti-device.so", NULL, &tcti_ctx, NULL); in test_get_tcti_match_second()
[all …]
Dtctildr.c23 static TSS2_TCTI_CONTEXT_COMMON_V2 tcti_ctx = { 0, }; variable
50 TSS2_TCTI_CONTEXT *tcti_ctx = NULL; in tcti_from_init_init_fail() local
51 TSS2_RC rc = tcti_from_init (local_init, NULL, &tcti_ctx); in tcti_from_init_init_fail()
68 if (ptr != &tcti_ctx && ptr != &tctildr_ctx) in __wrap_free()
99 TSS2_TCTI_CONTEXT *tcti_ctx = NULL; in tcti_from_init_calloc_fail() local
101 TSS2_RC rc = tcti_from_init (local_init, NULL, &tcti_ctx); in tcti_from_init_calloc_fail()
110 will_return(__wrap_calloc, &tcti_ctx); in tcti_from_init_second_init_fail()
123 will_return(__wrap_calloc, &tcti_ctx); in tcti_from_init_success()
163 will_return(__wrap_calloc, &tcti_ctx); in tcti_from_info_success()
272 will_return (__wrap_tctildr_get_tcti, &tcti_ctx); in tctildr_init_ex_calloc_fail_test()
[all …]
Dsys-execute.c113 TSS2_TCTI_CONTEXT *tcti_ctx = (TSS2_TCTI_CONTEXT *) &_tcti_v1_ctx; in setup() local
124 r = Tss2_Sys_Initialize(sys_ctx, size_ctx, tcti_ctx, &ver); in setup()
/external/tpm2-tss/src/tss2-tcti/
Dtcti-tbs.c37 tcti_tbs_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx) in tcti_tbs_context_cast() argument
39 if (tcti_ctx != NULL && TSS2_TCTI_MAGIC (tcti_ctx) == TCTI_TBS_MAGIC) { in tcti_tbs_context_cast()
40 return (TSS2_TCTI_TBS_CONTEXT*)tcti_ctx; in tcti_tbs_context_cast()
Dtcti-mssim.c39 tcti_mssim_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx) in tcti_mssim_context_cast() argument
41 if (tcti_ctx != NULL && TSS2_TCTI_MAGIC (tcti_ctx) == TCTI_MSSIM_MAGIC) { in tcti_mssim_context_cast()
42 return (TSS2_TCTI_MSSIM_CONTEXT*)tcti_ctx; in tcti_mssim_context_cast()
184 TSS2_TCTI_CONTEXT *tcti_ctx, in tcti_mssim_transmit() argument
188 TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tcti_ctx); in tcti_mssim_transmit()
Dtcti-device.c78 tcti_device_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx) in tcti_device_context_cast() argument
80 if (tcti_ctx != NULL && TSS2_TCTI_MAGIC (tcti_ctx) == TCTI_DEVICE_MAGIC) { in tcti_device_context_cast()
81 return (TSS2_TCTI_DEVICE_CONTEXT*)tcti_ctx; in tcti_device_context_cast()