PolarSSL v1.2.5
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;
50 };
51 
56 {
58  int timeout;
60 };
61 
67 void ssl_cache_init( ssl_cache_context *cache );
68 
75 int ssl_cache_get( void *data, ssl_session *session );
76 
83 int ssl_cache_set( void *data, const ssl_session *session );
84 
94 void ssl_cache_set_timeout( ssl_cache_context *cache, int timeout );
95 
103 void ssl_cache_set_max_entries( ssl_cache_context *cache, int max );
104 
110 void ssl_cache_free( ssl_cache_context *cache );
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* ssl_cache.h */