PolarSSL v1.2.7
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 #define SSL_CACHE_DEFAULT_TIMEOUT 86400
33 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
41 
46 {
47  time_t timestamp;
51 };
52 
57 {
59  int timeout;
61 };
62 
68 void ssl_cache_init( ssl_cache_context *cache );
69 
76 int ssl_cache_get( void *data, ssl_session *session );
77 
84 int ssl_cache_set( void *data, const ssl_session *session );
85 
95 void ssl_cache_set_timeout( ssl_cache_context *cache, int timeout );
96 
104 void ssl_cache_set_max_entries( ssl_cache_context *cache, int max );
105 
111 void ssl_cache_free( ssl_cache_context *cache );
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif /* ssl_cache.h */