The Great Renaming
A simple execution of tmp/invoke-rename.pl
This commit is contained in:
parent
b5904d25ef
commit
2cf5a7c98e
291 changed files with 36012 additions and 36012 deletions
|
@ -21,12 +21,12 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#ifndef POLARSSL_SSL_CACHE_H
|
||||
#define POLARSSL_SSL_CACHE_H
|
||||
#ifndef MBEDTLS_SSL_CACHE_H
|
||||
#define MBEDTLS_SSL_CACHE_H
|
||||
|
||||
#include "ssl.h"
|
||||
|
||||
#if defined(POLARSSL_THREADING_C)
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "threading.h"
|
||||
#endif
|
||||
|
||||
|
@ -38,12 +38,12 @@
|
|||
* \{
|
||||
*/
|
||||
|
||||
#if !defined(SSL_CACHE_DEFAULT_TIMEOUT)
|
||||
#define SSL_CACHE_DEFAULT_TIMEOUT 86400 /*!< 1 day */
|
||||
#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT)
|
||||
#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /*!< 1 day */
|
||||
#endif
|
||||
|
||||
#if !defined(SSL_CACHE_DEFAULT_MAX_ENTRIES)
|
||||
#define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */
|
||||
#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES)
|
||||
#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /*!< Maximum entries in cache */
|
||||
#endif
|
||||
|
||||
/* \} name SECTION: Module settings */
|
||||
|
@ -52,34 +52,34 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _ssl_cache_context ssl_cache_context;
|
||||
typedef struct _ssl_cache_entry ssl_cache_entry;
|
||||
typedef struct mbedtls_ssl_cache_context mbedtls_ssl_cache_context;
|
||||
typedef struct mbedtls_ssl_cache_entry mbedtls_ssl_cache_entry;
|
||||
|
||||
/**
|
||||
* \brief This structure is used for storing cache entries
|
||||
*/
|
||||
struct _ssl_cache_entry
|
||||
struct mbedtls_ssl_cache_entry
|
||||
{
|
||||
#if defined(POLARSSL_HAVE_TIME)
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
time_t timestamp; /*!< entry timestamp */
|
||||
#endif
|
||||
ssl_session session; /*!< entry session */
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
x509_buf peer_cert; /*!< entry peer_cert */
|
||||
mbedtls_ssl_session session; /*!< entry session */
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
mbedtls_x509_buf peer_cert; /*!< entry peer_cert */
|
||||
#endif
|
||||
ssl_cache_entry *next; /*!< chain pointer */
|
||||
mbedtls_ssl_cache_entry *next; /*!< chain pointer */
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Cache context
|
||||
*/
|
||||
struct _ssl_cache_context
|
||||
struct mbedtls_ssl_cache_context
|
||||
{
|
||||
ssl_cache_entry *chain; /*!< start of the chain */
|
||||
mbedtls_ssl_cache_entry *chain; /*!< start of the chain */
|
||||
int timeout; /*!< cache entry timeout */
|
||||
int max_entries; /*!< maximum entries */
|
||||
#if defined(POLARSSL_THREADING_C)
|
||||
threading_mutex_t mutex; /*!< mutex */
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
mbedtls_threading_mutex_t mutex; /*!< mutex */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -88,54 +88,54 @@ struct _ssl_cache_context
|
|||
*
|
||||
* \param cache SSL cache context
|
||||
*/
|
||||
void ssl_cache_init( ssl_cache_context *cache );
|
||||
void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache );
|
||||
|
||||
/**
|
||||
* \brief Cache get callback implementation
|
||||
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||
* (Thread-safe if MBEDTLS_THREADING_C is enabled)
|
||||
*
|
||||
* \param data SSL cache context
|
||||
* \param session session to retrieve entry for
|
||||
*/
|
||||
int ssl_cache_get( void *data, ssl_session *session );
|
||||
int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session );
|
||||
|
||||
/**
|
||||
* \brief Cache set callback implementation
|
||||
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||
* (Thread-safe if MBEDTLS_THREADING_C is enabled)
|
||||
*
|
||||
* \param data SSL cache context
|
||||
* \param session session to store entry for
|
||||
*/
|
||||
int ssl_cache_set( void *data, const ssl_session *session );
|
||||
int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session );
|
||||
|
||||
#if defined(POLARSSL_HAVE_TIME)
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
/**
|
||||
* \brief Set the cache timeout
|
||||
* (Default: SSL_CACHE_DEFAULT_TIMEOUT (1 day))
|
||||
* (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day))
|
||||
*
|
||||
* A timeout of 0 indicates no timeout.
|
||||
*
|
||||
* \param cache SSL cache context
|
||||
* \param timeout cache entry timeout in seconds
|
||||
*/
|
||||
void ssl_cache_set_timeout( ssl_cache_context *cache, int timeout );
|
||||
#endif /* POLARSSL_HAVE_TIME */
|
||||
void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout );
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
|
||||
/**
|
||||
* \brief Set the cache timeout
|
||||
* (Default: SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
|
||||
* (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
|
||||
*
|
||||
* \param cache SSL cache context
|
||||
* \param max cache entry maximum
|
||||
*/
|
||||
void ssl_cache_set_max_entries( ssl_cache_context *cache, int max );
|
||||
void mbedtls_ssl_cache_set_max_entries( mbedtls_ssl_cache_context *cache, int max );
|
||||
|
||||
/**
|
||||
* \brief Free referenced items in a cache context and clear memory
|
||||
*
|
||||
* \param cache SSL cache context
|
||||
*/
|
||||
void ssl_cache_free( ssl_cache_context *cache );
|
||||
void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue