Improve documentation

This commit is contained in:
Manuel Pégourié-Gonnard 2019-05-27 09:58:07 +02:00
parent 4bb1b99c7f
commit e0cd1d0184

View file

@ -2179,6 +2179,8 @@ int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session
* \return \c 0 if successful. * \return \c 0 if successful.
* \return #MBEDTLS_ERR_SSL_ALLOC_FAILED if memory allocation failed. * \return #MBEDTLS_ERR_SSL_ALLOC_FAILED if memory allocation failed.
* \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA if input data is invalid. * \return #MBEDTLS_ERR_SSL_BAD_INPUT_DATA if input data is invalid.
* \return Another negative value for other kinds of errors (for
* example, unsupported features in the embedded certificate).
*/ */
int mbedtls_ssl_session_load( mbedtls_ssl_session *session, int mbedtls_ssl_session_load( mbedtls_ssl_session *session,
const unsigned char *buf, const unsigned char *buf,
@ -2219,16 +2221,16 @@ int mbedtls_ssl_session_save( const mbedtls_ssl_session *session,
* \brief Get a pointer to the current session structure, for example * \brief Get a pointer to the current session structure, for example
* to serialise it. * to serialise it.
* *
* \warning Ownership of the session remains with the SSL context - the * \warning Ownership of the session remains with the SSL context, and
* returned pointer must not be kept after the connection has * the returned pointer is only guaranteed to be valid until
* ended or been renegotiated. * the next API call operating on the same \p ssl context.
* *
* \see mbedtls_ssl_session_save() * \see mbedtls_ssl_session_save()
* *
* \param ssl SSL context * \param ssl The SSL context.
* *
* \return A pointer to the current session if successful, * \return A pointer to the current session if successful.
* NULL if no session is active. * \return \c NULL if no session is active.
*/ */
const mbedtls_ssl_session *mbedtls_ssl_get_session_pointer( const mbedtls_ssl_context *ssl ); const mbedtls_ssl_session *mbedtls_ssl_get_session_pointer( const mbedtls_ssl_context *ssl );