Repharse comments

Rephrase comments to clarify them.
This commit is contained in:
Ron Eldor 2018-07-17 11:21:50 +03:00
parent 98848f020c
commit a9779f1aff

View file

@ -2379,10 +2379,16 @@ const mbedtls_x509_crt *mbedtls_ssl_get_peer_cert( const mbedtls_ssl_context *ss
* MBEDTLS_ERR_SSL_BAD_INPUT_DATA if used server-side or * MBEDTLS_ERR_SSL_BAD_INPUT_DATA if used server-side or
* arguments are otherwise invalid. * arguments are otherwise invalid.
* *
* \note Only the server certificate is copied, and not the chain * \note Only the server certificate is copied, and not the full chain,
* but this is not a problem because the result of the chain * so you should not attempt to validate the certificate again
* verification is stored in `verify_result` and can be checked * by calling \c mbedtls_x509_crt_verify() on it.
* with \c mbedtls_ssl_get_verify_result(). * Instead, you should use the results from the verification
* in the original handshake by calling \c mbedtls_ssl_get_verify_result()
* after loading the session again into a new SSL context
* using \c mbedtls_ssl_set_session().
*
* \note Once the session object is not needed anymore, you should
* free it by calling \c mbedtls_ssl_session_free().
* *
* \sa mbedtls_ssl_set_session() * \sa mbedtls_ssl_set_session()
*/ */
@ -2619,6 +2625,9 @@ void mbedtls_ssl_session_init( mbedtls_ssl_session *session );
* \brief Free referenced items in an SSL session including the * \brief Free referenced items in an SSL session including the
* peer certificate and clear memory * peer certificate and clear memory
* *
* \note A session object can be freed even if the SSL context
* that was used to retrieve the session is still in use.
*
* \param session SSL session * \param session SSL session
*/ */
void mbedtls_ssl_session_free( mbedtls_ssl_session *session ); void mbedtls_ssl_session_free( mbedtls_ssl_session *session );