32 #if defined(POLARSSL_SSL_CACHE_C)
48 time_t t = time( NULL );
102 time_t t = time( NULL ), oldest = 0;
124 if( oldest == 0 || cur->
timestamp < oldest )
189 if( timeout < 0 ) timeout = 0;
196 if( max < 0 ) max = 0;
void ssl_cache_init(ssl_cache_context *cache)
Initialize an SSL cache context.
#define SSL_CACHE_DEFAULT_TIMEOUT
SSL session cache implementation.
x509_buf raw
The raw certificate data (DER).
void ssl_session_free(ssl_session *session)
Free referenced items in an SSL session including the peer certificate and clear memory.
Configuration options (set of defines)
int ssl_cache_get(void *data, ssl_session *session)
Cache get callback implementation.
Container for an X.509 certificate.
void ssl_cache_free(ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
This structure is used for storing cache entries.
int x509parse_crt(x509_cert *chain, const unsigned char *buf, size_t buflen)
Parse one or more certificates and add them to the chained list.
unsigned char * p
ASN1 data, e.g.
void ssl_cache_set_timeout(ssl_cache_context *cache, int timeout)
Set the cache timeout (Default: SSL_CACHE_DEFAULT_TIMEOUT (1 day))
Type-length-value structure that allows for ASN1 using DER.
size_t len
ASN1 length, e.g.
#define SSL_CACHE_DEFAULT_MAX_ENTRIES
void ssl_cache_set_max_entries(ssl_cache_context *cache, int max)
Set the cache timeout (Default: SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
int ssl_cache_set(void *data, const ssl_session *session)
Cache set callback implementation.