PolarSSL v1.2.8
ssl_cache.h
Go to the documentation of this file.
1 
27 #ifndef POLARSSL_SSL_CACHE_H
28 #define POLARSSL_SSL_CACHE_H
29 
30 #include "ssl.h"
31 
32 #if !defined(POLARSSL_CONFIG_OPTIONS)
33 #define SSL_CACHE_DEFAULT_TIMEOUT 86400
34 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50
35 #endif /* !POLARSSL_CONFIG_OPTIONS */
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
43 
48 {
49  time_t timestamp;
53 };
54 
59 {
61  int timeout;
63 };
64 
70 void ssl_cache_init( ssl_cache_context *cache );
71 
78 int ssl_cache_get( void *data, ssl_session *session );
79 
86 int ssl_cache_set( void *data, const ssl_session *session );
87 
97 void ssl_cache_set_timeout( ssl_cache_context *cache, int timeout );
98 
106 void ssl_cache_set_max_entries( ssl_cache_context *cache, int max );
107 
113 void ssl_cache_free( ssl_cache_context *cache );
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif /* ssl_cache.h */