PolarSSL v1.2.12
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 */
ssl_cache_init
void ssl_cache_init(ssl_cache_context *cache)
Initialize an SSL cache context.
_ssl_cache_entry::next
ssl_cache_entry * next
Definition:
ssl_cache.h:52
_ssl_cache_context::chain
ssl_cache_entry * chain
Definition:
ssl_cache.h:60
ssl_cache_get
int ssl_cache_get(void *data, ssl_session *session)
Cache get callback implementation.
_ssl_cache_entry::peer_cert
x509_buf peer_cert
Definition:
ssl_cache.h:51
ssl_cache_free
void ssl_cache_free(ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
_ssl_cache_context
Cache context.
Definition:
ssl_cache.h:58
_ssl_cache_entry
This structure is used for storing cache entries.
Definition:
ssl_cache.h:47
_ssl_cache_entry::session
ssl_session session
Definition:
ssl_cache.h:50
ssl_cache_set_timeout
void ssl_cache_set_timeout(ssl_cache_context *cache, int timeout)
Set the cache timeout (Default: SSL_CACHE_DEFAULT_TIMEOUT (1 day))
_asn1_buf
Type-length-value structure that allows for ASN1 using DER.
Definition:
asn1.h:108
_ssl_cache_context::max_entries
int max_entries
Definition:
ssl_cache.h:62
ssl_cache_set_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))
_ssl_cache_context::timeout
int timeout
Definition:
ssl_cache.h:61
_ssl_cache_entry::timestamp
time_t timestamp
Definition:
ssl_cache.h:49
_ssl_session
Definition:
ssl.h:318
ssl.h
SSL/TLS functions.
ssl_cache_set
int ssl_cache_set(void *data, const ssl_session *session)
Cache set callback implementation.
Generated on Tue Jan 20 2015 14:17:12 for PolarSSL v1.2.12 by
1.8.6