Lines Matching refs:session

111 	uint8_t *session;  member
268 if (client_cache[i].session != NULL) { in tls_session_cache_reset()
269 mbedtls_free(client_cache[i].session); in tls_session_cache_reset()
575 mbedtls_ssl_session *session) in tls_session_save() argument
582 if (client_cache[i].session == NULL) { in tls_session_save()
584 if (entry == NULL || entry->session != NULL) { in tls_session_save()
596 (entry->session != NULL && in tls_session_save()
605 if (entry->session != NULL) { in tls_session_save()
606 mbedtls_free(entry->session); in tls_session_save()
607 entry->session = NULL; in tls_session_save()
610 (void)mbedtls_ssl_session_save(session, NULL, 0, &session_len); in tls_session_save()
612 entry->session = mbedtls_calloc(1, session_len); in tls_session_save()
613 if (entry->session == NULL) { in tls_session_save()
618 ret = mbedtls_ssl_session_save(session, entry->session, session_len, in tls_session_save()
622 mbedtls_free(entry->session); in tls_session_save()
623 entry->session = NULL; in tls_session_save()
635 mbedtls_ssl_session *session) in tls_session_get() argument
641 if (client_cache[i].session != NULL && in tls_session_get()
652 ret = mbedtls_ssl_session_load(session, entry->session, in tls_session_get()
656 mbedtls_free(entry->session); in tls_session_get()
657 entry->session = NULL; in tls_session_get()
669 mbedtls_ssl_session session; in tls_session_store() local
678 mbedtls_ssl_session_init(&session); in tls_session_store()
680 ret = mbedtls_ssl_get_session(&context->ssl, &session); in tls_session_store()
686 ret = tls_session_save(&peer_addr, &session); in tls_session_store()
692 mbedtls_ssl_session_free(&session); in tls_session_store()
699 mbedtls_ssl_session session; in tls_session_restore() local
708 mbedtls_ssl_session_init(&session); in tls_session_restore()
710 ret = tls_session_get(&peer_addr, &session); in tls_session_restore()
716 ret = mbedtls_ssl_set_session(&context->ssl, &session); in tls_session_restore()
722 mbedtls_ssl_session_free(&session); in tls_session_restore()