Lines Matching defs:entry
81 mbedtls_ssl_cache_entry *entry;
89 ret = ssl_cache_find_entry(cache, session_id, session_id_len, &entry);
95 entry->session,
96 entry->session_len);
113 /* zeroize a cache entry */
114 static void ssl_cache_entry_zeroize(mbedtls_ssl_cache_entry *entry)
116 if (entry == NULL) {
121 if (entry->session != NULL) {
122 mbedtls_zeroize_and_free(entry->session, entry->session_len);
125 /* zeroize the whole entry structure */
126 mbedtls_platform_zeroize(entry, sizeof(mbedtls_ssl_cache_entry));
143 /* Check 1: Is there already an entry with the given session ID?
149 * entry, both of which will be used later. */
161 /* Check 2: Is there an outdated entry in the cache?
165 * If not, remember the oldest entry in `old` for later.
185 /* Create new entry */
212 /* Reuse first entry in chain, but move to last place. */
224 /* Now `old` points to the oldest entry to be overwritten. */
229 /* If we're reusing an entry, free it first. */
327 mbedtls_ssl_cache_entry *entry;
336 ret = ssl_cache_find_entry(cache, session_id, session_id_len, &entry);
337 /* No valid entry found, exit with success */
343 /* Now we remove the entry from the chain */
344 if (entry == cache->chain) {
345 cache->chain = entry->next;
349 if (prev->next == entry) {
350 prev->next = entry->next;
356 ssl_cache_entry_zeroize(entry);
357 mbedtls_free(entry);