/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | ssl_cache.c | 81 if( session->id_len != entry->session.id_len || in mbedtls_ssl_cache_get() 82 memcmp( session->id, entry->session.id, in mbedtls_ssl_cache_get() 83 entry->session.id_len ) != 0 ) in mbedtls_ssl_cache_get() 88 ret = mbedtls_ssl_session_copy( session, &entry->session ); in mbedtls_ssl_cache_get() 118 session->peer_cert = NULL; in mbedtls_ssl_cache_get() 170 if( memcmp( session->id, cur->session.id, cur->session.id_len ) == 0 ) in mbedtls_ssl_cache_set() 260 ret = mbedtls_ssl_session_copy( &cur->session, session ); in mbedtls_ssl_cache_set() 270 if( cur->session.peer_cert != NULL ) in mbedtls_ssl_cache_set() 281 cur->session.peer_cert->raw.p, in mbedtls_ssl_cache_set() 286 mbedtls_free( cur->session.peer_cert ); in mbedtls_ssl_cache_set() [all …]
|
A D | ssl_tls.c | 3145 if( !session ) in ssl_calc_finished_ssl() 3146 session = ssl->session; in ssl_calc_finished_ssl() 3228 if( !session ) in ssl_calc_finished_tls() 3229 session = ssl->session; in ssl_calc_finished_tls() 3293 if( !session ) in ssl_calc_finished_tls_sha256() 3294 session = ssl->session; in ssl_calc_finished_tls_sha256() 3370 if( !session ) in ssl_calc_finished_tls_sha384() 3371 session = ssl->session; in ssl_calc_finished_tls_sha384() 5562 memcpy( p, session->ticket, session->ticket_len ); in ssl_session_save() 5796 session->ticket = mbedtls_calloc( 1, session->ticket_len ); in ssl_session_load() [all …]
|
A D | ssl_ticket.c | 201 const mbedtls_ssl_session *session, in mbedtls_ssl_ticket_write() argument 243 if( ( ret = mbedtls_ssl_session_save( session, in mbedtls_ssl_ticket_write() 300 mbedtls_ssl_session *session, in mbedtls_ssl_ticket_parse() argument 365 if( ( ret = mbedtls_ssl_session_load( session, ticket, clear_len ) ) != 0 ) in mbedtls_ssl_ticket_parse() 373 if( current_time < session->start || in mbedtls_ssl_ticket_parse() 374 (uint32_t)( current_time - session->start ) > ctx->ticket_lifetime ) in mbedtls_ssl_ticket_parse()
|
/optee_os-3.20.0/ta/pkcs11/src/ |
A D | processing.c | 24 if (session_is_active(session)) in get_ready_session() 95 if (session->processing && in get_active_session() 104 if (!session->processing) in release_active_processing() 120 TEE_Free(session->processing); in release_active_processing() 121 session->processing = NULL; in release_active_processing() 245 rc = get_ready_session(session); in entry_generate_secret() 326 session->handle, obj_handle); in entry_generate_secret() 438 rc = get_ready_session(session); in entry_generate_key_pair() 627 rc = get_ready_session(session); in entry_processing_init() 887 rc = get_ready_session(session); in entry_processing_key() [all …]
|
A D | object.c | 34 struct pkcs11_session *session) in pkcs11_handle2object() argument 60 struct pkcs11_session *session) in pkcs11_object2handle() argument 392 session->handle, obj_handle); in entry_create_object() 456 session->handle, object_handle); in entry_destroy_object() 525 if (session_is_active(session)) { in entry_find_objects_init() 530 if (session->find_ctx) { in entry_find_objects_init() 640 session->find_ctx = find_ctx; in entry_find_objects_init() 684 ctx = session->find_ctx; in entry_find_objects() 705 session->find_ctx = NULL; in release_session_find_obj_context() 732 if (!session->find_ctx) in entry_find_objects_final() [all …]
|
A D | pkcs11_token.c | 183 if (session->processing) in set_processing_state() 583 session->state = state; in set_session_state() 643 session = TEE_Malloc(sizeof(*session), TEE_MALLOC_FILL_ZERO); in entry_ck_open_session() 644 if (!session) in entry_ck_open_session() 647 session->handle = handle_get(&client->session_handle_db, session); in entry_ck_open_session() 648 if (!session->handle) { in entry_ck_open_session() 649 TEE_Free(session); in entry_ck_open_session() 653 session->token = token; in entry_ck_open_session() 684 TAILQ_REMOVE(&session->client->session_list, session, link); in close_ck_session() 685 handle_put(&session->client->session_handle_db, session->handle); in close_ck_session() [all …]
|
A D | pkcs11_token.h | 281 return session->processing; in session_is_active() 291 return session->state == PKCS11_CKS_RW_PUBLIC_SESSION || in pkcs11_session_is_read_write() 292 session->state == PKCS11_CKS_RW_USER_FUNCTIONS || in pkcs11_session_is_read_write() 293 session->state == PKCS11_CKS_RW_SO_FUNCTIONS; in pkcs11_session_is_read_write() 298 return session->state == PKCS11_CKS_RO_PUBLIC_SESSION || in pkcs11_session_is_public() 299 session->state == PKCS11_CKS_RW_PUBLIC_SESSION; in pkcs11_session_is_public() 304 return session->state == PKCS11_CKS_RO_USER_FUNCTIONS || in pkcs11_session_is_user() 305 session->state == PKCS11_CKS_RW_USER_FUNCTIONS; in pkcs11_session_is_user() 310 return session->state == PKCS11_CKS_RW_SO_FUNCTIONS; in pkcs11_session_is_so() 316 return &session->object_list; in pkcs11_get_session_objects() [all …]
|
A D | processing.h | 115 void release_active_processing(struct pkcs11_session *session); 129 enum pkcs11_rc init_asymm_operation(struct pkcs11_session *session, 134 enum pkcs11_rc step_asymm_operation(struct pkcs11_session *session, 139 enum pkcs11_rc wrap_data_by_asymm_enc(struct pkcs11_session *session, 152 enum pkcs11_rc init_symm_operation(struct pkcs11_session *session, 157 enum pkcs11_rc step_symm_operation(struct pkcs11_session *session, 165 enum pkcs11_rc derive_key_by_symm_enc(struct pkcs11_session *session, 168 enum pkcs11_rc wrap_data_by_symm_enc(struct pkcs11_session *session, 180 init_digest_operation(struct pkcs11_session *session, 183 enum pkcs11_rc step_digest_operation(struct pkcs11_session *session, [all …]
|
A D | processing_digest.c | 66 allocate_tee_operation(struct pkcs11_session *session, in allocate_tee_operation() argument 72 assert(session->processing->tee_op_handle == TEE_HANDLE_NULL); in allocate_tee_operation() 77 res = TEE_AllocateOperation(&session->processing->tee_op_handle, in allocate_tee_operation() 88 enum pkcs11_rc init_digest_operation(struct pkcs11_session *session, in init_digest_operation() argument 95 rc = allocate_tee_operation(session, proc_params); in init_digest_operation() 97 session->processing->mecha_type = proc_params->id; in init_digest_operation() 111 enum pkcs11_rc step_digest_operation(struct pkcs11_session *session, in step_digest_operation() argument 125 struct active_processing *proc = session->processing; in step_digest_operation()
|
A D | object.h | 40 struct pkcs11_session *session); 43 struct pkcs11_session *session); 49 enum pkcs11_rc create_object(void *session, struct obj_attrs *attributes, 55 void destroy_object(struct pkcs11_session *session, 88 void release_session_find_obj_context(struct pkcs11_session *session);
|
A D | processing_symm.c | 197 allocate_tee_operation(struct pkcs11_session *session, in allocate_tee_operation() argument 361 &session->processing->extra_ctx, in load_tee_key() 529 init_tee_operation(struct pkcs11_session *session, in init_tee_operation() argument 589 TEE_CipherInit(session->processing->tee_op_handle, in init_tee_operation() 594 rc = tee_init_ctr_operation(session->processing, in init_tee_operation() 623 rc = load_tee_key(session, obj, proc_params); in init_symm_operation() 627 rc = init_tee_operation(session, proc_params); in init_symm_operation() 629 session->processing->mecha_type = proc_params->id; in init_symm_operation() 725 struct active_processing *proc = session->processing; in step_symm_operation() 844 switch (session->processing->mecha_type) { in step_symm_operation() [all …]
|
A D | pkcs11_attributes.h | 134 enum pkcs11_rc check_created_attrs_against_token(struct pkcs11_session *session, 156 enum pkcs11_rc check_access_attrs_against_token(struct pkcs11_session *session, 160 check_mechanism_against_processing(struct pkcs11_session *session, 183 enum pkcs11_rc check_attrs_against_modification(struct pkcs11_session *session,
|
A D | processing_asymm.c | 211 allocate_tee_operation(struct pkcs11_session *session, in allocate_tee_operation() argument 222 struct active_processing *processing = session->processing; in allocate_tee_operation() 380 init_tee_operation(struct pkcs11_session *session, in init_tee_operation() argument 385 struct active_processing *proc = session->processing; in init_tee_operation() 429 rc = load_tee_key(session, obj, function); in init_asymm_operation() 433 rc = init_tee_operation(session, proc_params, obj); in init_asymm_operation() 435 session->processing->mecha_type = proc_params->id; in init_asymm_operation() 467 struct active_processing *proc = session->processing; in step_asymm_operation() 935 release_active_processing(session); in do_asymm_derivation() 1083 struct active_processing *proc = session->processing; in wrap_data_by_asymm_enc() [all …]
|
A D | pkcs11_attributes.c | 87 if (session->processing->always_authen && in check_mechanism_against_processing() 88 !session->processing->relogged) in check_mechanism_against_processing() 101 if (session->processing->always_authen && in check_mechanism_against_processing() 102 !session->processing->relogged) in check_mechanism_against_processing() 117 if (session->processing->always_authen && in check_mechanism_against_processing() 118 !session->processing->relogged) in check_mechanism_against_processing() 126 !session->processing->relogged) in check_mechanism_against_processing() 1319 pkcs11_session_is_so(session))) { in check_access_attrs_against_token() 1341 !pkcs11_session_is_so(session)) { in check_created_attrs_against_token() 1918 struct pkcs11_session *session, in attr_is_modifiable_secret_key() argument [all …]
|
A D | serializer.c | 161 struct pkcs11_session *session = NULL; in serialargs_get_session_from_handle() local 167 session = pkcs11_handle2session(session_handle, client); in serialargs_get_session_from_handle() 168 if (!session) in serialargs_get_session_from_handle() 171 *sess = session; in serialargs_get_session_from_handle()
|
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/apis/ |
A D | sss.c | 59 sss_se05x_session_t *session = NULL; in se050_rotate_scp03_keys() local 103 session = &ctx->session; in se050_rotate_scp03_keys() 110 sss_se05x_session_close(session); in se050_rotate_scp03_keys() 114 status = sss_se05x_session_open(session, kType_SSS_SE_SE05x, 0, in se050_rotate_scp03_keys() 123 status = se050_scp03_send_rotate_cmd(&session->s_ctx, &cmd); in se050_rotate_scp03_keys() 148 sss_status_t se050_enable_scp03(sss_se05x_session_t *session) in se050_enable_scp03() argument 164 if (session->subsystem) in se050_enable_scp03() 165 sss_se05x_session_close(session); in se050_enable_scp03() 188 sss_se05x_session_t *session = NULL; in se050_session_open() local 194 session = &ctx->session; in se050_session_open() [all …]
|
A D | apdu.c | 446 if (!store || !store->session || !k_object) in se050_key_store_set_rsa_key_bin() 454 return set_rsa_public(&store->session->s_ctx, in se050_key_store_set_rsa_key_bin() 459 return set_rsa_private_rsa(&store->session->s_ctx, in se050_key_store_set_rsa_key_bin() 464 return set_rsa_private_rsa_crt(&store->session->s_ctx, in se050_key_store_set_rsa_key_bin() 470 return set_rsa_keypair_rsa(&store->session->s_ctx, in se050_key_store_set_rsa_key_bin() 475 return set_rsa_keypair_rsa_crt(&store->session->s_ctx, in se050_key_store_set_rsa_key_bin() 666 if (!store || !store->session || !k_object) in se050_key_store_set_ecc_key_bin() 677 return set_ecc_public(&store->session->s_ctx, in se050_key_store_set_ecc_key_bin() 683 return set_ecc_private(&store->session->s_ctx, in se050_key_store_set_ecc_key_bin() 689 return set_ecc_pair(&store->session->s_ctx, in se050_key_store_set_ecc_key_bin() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | ssl_cache.h | 70 mbedtls_ssl_session session; /*!< entry session */ member 105 int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ); 114 int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session );
|
/optee_os-3.20.0/core/drivers/crypto/se050/ |
A D | session.c | 25 status = se050_factory_reset(&se050_ctx.session.s_ctx); in se050_core_early_init() 30 if (se050_ctx.session.subsystem == kType_SSS_SubSystem_NONE) in se050_core_early_init() 37 se050_session = (sss_se05x_session_t *)((void *)&se050_ctx.session); in se050_core_early_init() 96 se050_session = (sss_se05x_session_t *)((void *)&se050_ctx.session); in se050_early_init_scp03()
|
A D | sub.mk | 11 srcs-y += session.c
|
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/utils/ |
A D | info.c | 154 static sss_status_t applet_get_id(sss_se05x_session_t *session, bool display) in applet_get_id() argument 163 ret = Se05x_API_CheckObjectExists(&session->s_ctx, in applet_get_id() 169 ret = Se05x_API_ReadObject(&session->s_ctx, in applet_get_id() 184 ret = Se05x_API_GetVersion(&session->s_ctx, applet_version, in applet_get_id() 207 sss_status_t se050_get_se_info(sss_se05x_session_t *session, bool display) in se050_get_se_info() argument 212 if (session) { in se050_get_se_info() 213 ret = applet_get_id(session, display); in se050_get_se_info() 219 ret = jcop4_get_id(session->s_ctx.conn_ctx, display); in se050_get_se_info()
|
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/include/ |
A D | se050_sss_apis.h | 18 sss_se05x_session_t session; member 36 sss_status_t se050_enable_scp03(sss_se05x_session_t *session);
|
/optee_os-3.20.0/lib/libutee/arch/arm/ |
A D | user_ta_entry.c | 318 struct ta_session *session; in entry_open_session() local 326 session = ta_header_get_session(session_id); in entry_open_session() 327 if (!session) in entry_open_session() 334 &session->session_ctx); in entry_open_session() 345 struct ta_session *session = ta_header_get_session(session_id); in entry_close_session() local 347 if (!session) in entry_close_session() 350 TA_CloseSessionEntryPoint(session->session_ctx); in entry_close_session() 362 struct ta_session *session = ta_header_get_session(session_id); in entry_invoke_command() local 364 if (!session) in entry_invoke_command() 370 res = TA_InvokeCommandEntryPoint(session->session_ctx, cmd_id, in entry_invoke_command()
|
/optee_os-3.20.0/lib/libutee/ |
A D | tee_api.c | 152 TEE_TASessionHandle *session, in TEE_OpenTASession() argument 166 __utee_check_out_annotation(session, sizeof(*session)); in TEE_OpenTASession() 190 *session = (TEE_TASessionHandle)(uintptr_t)s; in TEE_OpenTASession() 194 void TEE_CloseTASession(TEE_TASessionHandle session) in TEE_CloseTASession() argument 196 if (session != TEE_HANDLE_NULL) { in TEE_CloseTASession() 197 TEE_Result res = _utee_close_ta_session((uintptr_t)session); in TEE_CloseTASession() 204 TEE_Result TEE_InvokeTACommand(TEE_TASessionHandle session, in TEE_InvokeTACommand() argument 228 res = _utee_invoke_ta_command((uintptr_t)session, in TEE_InvokeTACommand()
|
/optee_os-3.20.0/core/kernel/ |
A D | user_ta.c | 131 static TEE_Result user_ta_enter(struct ts_session *session, in user_ta_enter() argument 137 struct user_ta_ctx *utc = to_user_ta_ctx(session->ctx); in user_ta_enter() 138 struct tee_ta_session *ta_sess = to_ta_session(session); in user_ta_enter() 155 ts_push_current_session(session); in user_ta_enter() 166 res = thread_enter_user_mode(func, kaddr_to_uref(session), in user_ta_enter() 200 assert(ts_sess == session); in user_ta_enter()
|