1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-05-10 00:49:04 +08:00

ssl_cache: Improve some comments

Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
Pengyu Lv 2023-03-16 11:38:43 +08:00
parent db47f2fbd4
commit b1895899f1
3 changed files with 5 additions and 4 deletions

View File

@ -132,9 +132,9 @@ int mbedtls_ssl_cache_set(void *data,
* associated to \p session. * associated to \p session.
* \param session_id_len The length of \p session_id in bytes. * \param session_id_len The length of \p session_id in bytes.
* *
* \return 0: The cache entry for session with provided ID * \return \c 0: The cache entry for session with provided ID
* is removed or does not exist. * is removed or does not exist.
* Otherwise: fail. * A negative error code on failure.
*/ */
int mbedtls_ssl_cache_remove(void *data, int mbedtls_ssl_cache_remove(void *data,
unsigned char const *session_id, unsigned char const *session_id,

View File

@ -29,6 +29,7 @@
#include "mbedtls/ssl_cache.h" #include "mbedtls/ssl_cache.h"
#include "ssl_misc.h" #include "ssl_misc.h"
#include "mbedtls/error.h"
#include <string.h> #include <string.h>
@ -335,7 +336,7 @@ int mbedtls_ssl_cache_remove(void *data,
unsigned char const *session_id, unsigned char const *session_id,
size_t session_id_len) size_t session_id_len)
{ {
int ret = 1; int ret = MBEDTLS_ERR_ERROR_GENERIC_ERROR;
mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data; mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data;
mbedtls_ssl_cache_entry *entry; mbedtls_ssl_cache_entry *entry;
mbedtls_ssl_cache_entry *prev; mbedtls_ssl_cache_entry *prev;

View File

@ -669,7 +669,7 @@ struct options {
#if defined(MBEDTLS_HAVE_TIME) #if defined(MBEDTLS_HAVE_TIME)
int cache_timeout; /* expiration delay of session cache entries*/ int cache_timeout; /* expiration delay of session cache entries*/
#endif #endif
int cache_remove; /* enable / disable cache removement */ int cache_remove; /* enable / disable cache entry removal */
char *sni; /* string describing sni information */ char *sni; /* string describing sni information */
const char *curves; /* list of supported elliptic curves */ const char *curves; /* list of supported elliptic curves */
const char *sig_algs; /* supported TLS 1.3 signature algorithms */ const char *sig_algs; /* supported TLS 1.3 signature algorithms */