Sergey Pastor / 1

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

tls_cache.h File Reference

tls_cache.h File Reference

Session cache management. More...

Go to the source code of this file.

Functions

TlsCachetlsInitCache (uint_t size)
 Session cache initialization.
TlsSessiontlsFindCache (TlsCache *cache, const uint8_t *id, size_t length)
 Search the session cache for a given session ID.
error_t tlsSaveToCache (TlsContext *context)
 Save current session in cache.
error_t tlsRemoveFromCache (TlsContext *context)
 Remove current session from cache.
void tlsFreeCache (TlsCache *cache)
 Properly dispose a session cache.

Detailed Description

Session cache management.

License

Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneSSL Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file tls_cache.h.


Function Documentation

TlsSession* tlsFindCache ( TlsCache cache,
const uint8_t *  id,
size_t  length 
)

Search the session cache for a given session ID.

Parameters:
[in]cachePointer to the session cache
[in]idExpected session ID
[in]lengthLength of the session ID
Returns:
A pointer to the matching session is returned. NULL is returned if the specified ID could not be found in the session cache

Definition at line 95 of file tls_cache.c.

void tlsFreeCache ( TlsCache cache )

Properly dispose a session cache.

Parameters:
[in]cachePointer to the session cache to be released

Definition at line 286 of file tls_cache.c.

TlsCache* tlsInitCache ( uint_t  size )

Session cache initialization.

Parameters:
[in]sizeMaximum number of cache entries
Returns:
Handle referencing the fully initialized session cache

Definition at line 48 of file tls_cache.c.

error_t tlsRemoveFromCache ( TlsContext *  context )

Remove current session from cache.

Parameters:
[in]contextTLS context
Returns:
Error code

Definition at line 240 of file tls_cache.c.

error_t tlsSaveToCache ( TlsContext *  context )

Save current session in cache.

Parameters:
[in]contextTLS context
Returns:
Error code

Definition at line 161 of file tls_cache.c.