Merge pull request #7298 from lpy4105/issue/6840/add-cache-entry-removal-api
ssl_cache: misc improvements
This commit is contained in:
commit
c9e8a65d06
4 changed files with 25 additions and 14 deletions
|
@ -106,7 +106,8 @@
|
|||
/* Error space gap */
|
||||
/* Error space gap */
|
||||
/* Error space gap */
|
||||
/* Error space gap */
|
||||
/** Cache entry not found */
|
||||
#define MBEDTLS_ERR_SSL_CACHE_ENTRY_NOT_FOUND -0x7E80
|
||||
/** Memory allocation failed */
|
||||
#define MBEDTLS_ERR_SSL_ALLOC_FAILED -0x7F00
|
||||
/** Hardware acceleration function returned with error */
|
||||
|
|
|
@ -102,6 +102,11 @@ void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache);
|
|||
* \param session_id_len The length of \p session_id in bytes.
|
||||
* \param session The address at which to store the session
|
||||
* associated with \p session_id, if present.
|
||||
*
|
||||
* \return \c 0 on success.
|
||||
* \return #MBEDTLS_ERR_SSL_CACHE_ENTRY_NOT_FOUND if there is
|
||||
* no cache entry with specified session ID found, or
|
||||
* any other negative error code for other failures.
|
||||
*/
|
||||
int mbedtls_ssl_cache_get(void *data,
|
||||
unsigned char const *session_id,
|
||||
|
@ -117,6 +122,9 @@ int mbedtls_ssl_cache_get(void *data,
|
|||
* associated to \p session.
|
||||
* \param session_id_len The length of \p session_id in bytes.
|
||||
* \param session The session to store.
|
||||
*
|
||||
* \return \c 0 on success.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ssl_cache_set(void *data,
|
||||
unsigned char const *session_id,
|
||||
|
@ -132,9 +140,10 @@ int mbedtls_ssl_cache_set(void *data,
|
|||
* associated to \p session.
|
||||
* \param session_id_len The length of \p session_id in bytes.
|
||||
*
|
||||
* \return 0: The cache entry for session with provided ID
|
||||
* is removed or does not exist.
|
||||
* Otherwise: fail.
|
||||
* \return \c 0 on success. This indicates the cache entry for
|
||||
* the session with provided ID is removed or does not
|
||||
* exist.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ssl_cache_remove(void *data,
|
||||
unsigned char const *session_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue