• Home
  • Raw
  • Download

Lines Matching refs:cur

62     mbedtls_ssl_cache_entry *cur;  in ssl_cache_find_entry()  local
64 for( cur = cache->chain; cur != NULL; cur = cur->next ) in ssl_cache_find_entry()
68 (int) ( t - cur->timestamp ) > cache->timeout ) in ssl_cache_find_entry()
72 if( session_id_len != cur->session_id_len || in ssl_cache_find_entry()
73 memcmp( session_id, cur->session_id, in ssl_cache_find_entry()
74 cur->session_id_len ) != 0 ) in ssl_cache_find_entry()
82 if( cur != NULL ) in ssl_cache_find_entry()
84 *dst = cur; in ssl_cache_find_entry()
138 mbedtls_ssl_cache_entry *cur, *last; in ssl_cache_pick_writing_slot() local
149 for( cur = cache->chain; cur != NULL; cur = cur->next ) in ssl_cache_pick_writing_slot()
152 if( session_id_len == cur->session_id_len && in ssl_cache_pick_writing_slot()
153 memcmp( session_id, cur->session_id, cur->session_id_len ) == 0 ) in ssl_cache_pick_writing_slot()
157 last = cur; in ssl_cache_pick_writing_slot()
168 for( cur = cache->chain; cur != NULL; cur = cur->next ) in ssl_cache_pick_writing_slot()
171 (int) ( t - cur->timestamp ) > cache->timeout ) in ssl_cache_pick_writing_slot()
176 if( oldest == 0 || cur->timestamp < oldest ) in ssl_cache_pick_writing_slot()
178 oldest = cur->timestamp; in ssl_cache_pick_writing_slot()
179 old = cur; in ssl_cache_pick_writing_slot()
189 cur = mbedtls_calloc( 1, sizeof(mbedtls_ssl_cache_entry) ); in ssl_cache_pick_writing_slot()
190 if( cur == NULL ) in ssl_cache_pick_writing_slot()
195 cache->chain = cur; in ssl_cache_pick_writing_slot()
197 last->next = cur; in ssl_cache_pick_writing_slot()
225 cur = old; in ssl_cache_pick_writing_slot()
230 cur->timestamp = t; in ssl_cache_pick_writing_slot()
234 if( cur->session != NULL ) in ssl_cache_pick_writing_slot()
236 mbedtls_free( cur->session ); in ssl_cache_pick_writing_slot()
237 cur->session = NULL; in ssl_cache_pick_writing_slot()
238 cur->session_len = 0; in ssl_cache_pick_writing_slot()
239 memset( cur->session_id, 0, sizeof( cur->session_id ) ); in ssl_cache_pick_writing_slot()
240 cur->session_id_len = 0; in ssl_cache_pick_writing_slot()
243 *dst = cur; in ssl_cache_pick_writing_slot()
254 mbedtls_ssl_cache_entry *cur; in mbedtls_ssl_cache_set() local
266 &cur ); in mbedtls_ssl_cache_set()
294 if( session_id_len > sizeof( cur->session_id ) ) in mbedtls_ssl_cache_set()
299 cur->session_id_len = session_id_len; in mbedtls_ssl_cache_set()
300 memcpy( cur->session_id, session_id, session_id_len ); in mbedtls_ssl_cache_set()
302 cur->session = session_serialized; in mbedtls_ssl_cache_set()
303 cur->session_len = session_serialized_len; in mbedtls_ssl_cache_set()
338 mbedtls_ssl_cache_entry *cur, *prv; in mbedtls_ssl_cache_free() local
340 cur = cache->chain; in mbedtls_ssl_cache_free()
342 while( cur != NULL ) in mbedtls_ssl_cache_free()
344 prv = cur; in mbedtls_ssl_cache_free()
345 cur = cur->next; in mbedtls_ssl_cache_free()