PolarSSL v1.2.9
Main Page
Modules
Data Structures
Files
File List
Globals
include
polarssl
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
41
typedef
struct
_ssl_cache_context
ssl_cache_context
;
42
typedef
struct
_ssl_cache_entry
ssl_cache_entry
;
43
47
struct
_ssl_cache_entry
48
{
49
time_t
timestamp
;
50
ssl_session
session
;
51
x509_buf
peer_cert
;
52
ssl_cache_entry
*
next
;
53
};
54
58
struct
_ssl_cache_context
59
{
60
ssl_cache_entry
*
chain
;
61
int
timeout
;
62
int
max_entries
;
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 */
Generated on Wed Oct 2 2013 15:13:47 for PolarSSL v1.2.9 by
1.8.3.1