mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-07 23:45:18 +00:00
Add session saving/loading
For now, the header (version+format bytes) is duplicated. This might be optimized later.
This commit is contained in:
parent
4c90e858b5
commit
4b7e6b925f
2 changed files with 92 additions and 5 deletions
|
|
@ -3912,7 +3912,11 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl );
|
|||
* \note \p olen is updated to the correct value regardless of
|
||||
* whether \p buf_len was large enough. This makes it possible
|
||||
* to determine the necessary size by calling this function
|
||||
* with \p buf set to \c NULL and \p buf_len to \c 0.
|
||||
* with \p buf set to \c NULL and \p buf_len to \c 0. However,
|
||||
* the value of \p olen is only guaranteed to be correct when
|
||||
* the function returns #MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL or
|
||||
* \c 0. If the return value is different, then the value of
|
||||
* \p olen is undefined.
|
||||
*
|
||||
* \return \c 0 if successful.
|
||||
* \return #MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL if \p buf is too small.
|
||||
|
|
@ -3977,6 +3981,11 @@ int mbedtls_ssl_context_save( mbedtls_ssl_context *ssl,
|
|||
* newly-configured value with the value that was active when
|
||||
* the context was saved.
|
||||
*
|
||||
* \note When this function returns an error code, it calls
|
||||
* mbedtls_ssl_free() on \p ssl. In this case, you need to
|
||||
* prepare the context with the usual sequence starting with a
|
||||
* call to mbedtls_ssl_init() if you want to use it again.
|
||||
*
|
||||
* \param ssl The SSL context structure to be populated. It must have
|
||||
* been prepared as described in the note above.
|
||||
* \param buf The buffer holding the serialized connection data. It must
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue