RetroArch
ssl_cache.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_SSL_CACHE_H
24 #define MBEDTLS_SSL_CACHE_H
25 
26 #include "ssl.h"
27 
28 #if defined(MBEDTLS_THREADING_C)
29 #include "threading.h"
30 #endif
31 
40 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT)
41 #define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400
42 #endif
43 
44 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES)
45 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50
46 #endif
47 
48 /* \} name SECTION: Module settings */
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
56 
61 {
62 #if defined(MBEDTLS_HAVE_TIME)
64 #endif
66 #if defined(MBEDTLS_X509_CRT_PARSE_C)
68 #endif
70 };
71 
76 {
78  int timeout;
80 #if defined(MBEDTLS_THREADING_C)
81  mbedtls_threading_mutex_t mutex;
82 #endif
83 };
84 
91 
99 int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session );
100 
108 int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session );
109 
110 #if defined(MBEDTLS_HAVE_TIME)
111 
121 #endif /* MBEDTLS_HAVE_TIME */
122 
131 
138 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif /* ssl_cache.h */
GLbitfield GLuint64 timeout
Definition: glext.h:7831
Threading abstraction layer.
void mbedtls_ssl_cache_set_timeout(mbedtls_ssl_cache_context *cache, int timeout)
Set the cache timeout (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day))
Definition: ssl_cache.c:286
int mbedtls_ssl_cache_get(void *data, mbedtls_ssl_session *session)
Cache get callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled)
Definition: ssl_cache.c:58
int timeout
Definition: ssl_cache.h:78
void mbedtls_ssl_cache_free(mbedtls_ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
Definition: ssl_cache.c:301
static sys_sem mutex
Definition: memp.c:120
Definition: ibxm.h:9
Definition: asn1.h:118
time_t mbedtls_time_t
Definition: platform_time.h:52
This structure is used for storing cache entries.
Definition: ssl_cache.h:60
int mbedtls_ssl_cache_set(void *data, const mbedtls_ssl_session *session)
Cache set callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled)
Definition: ssl_cache.c:137
SSL/TLS functions.
mbedtls_ssl_cache_entry * chain
Definition: ssl_cache.h:77
int max_entries
Definition: ssl_cache.h:79
mbedtls_time_t timestamp
Definition: ssl_cache.h:63
void mbedtls_ssl_cache_set_max_entries(mbedtls_ssl_cache_context *cache, int max)
Set the maximum number of cache entries (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
Definition: ssl_cache.c:294
mbedtls_ssl_cache_entry * next
Definition: ssl_cache.h:69
mbedtls_x509_buf peer_cert
Definition: ssl_cache.h:67
mbedtls_ssl_session session
Definition: ssl_cache.h:65
Cache context.
Definition: ssl_cache.h:75
void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache)
Initialize an SSL cache context.
Definition: ssl_cache.c:46
Definition: ssl.h:548