From 6e7c6e8a66bdb817633839d198bc6d3b102e8310 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Tue, 8 Jun 2021 01:23:53 +0700 Subject: [PATCH] add comments to dox header file --- doc/dox_comments/header_files/ssl.h | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/dox_comments/header_files/ssl.h b/doc/dox_comments/header_files/ssl.h index d49fba1d5..4194b61e7 100644 --- a/doc/dox_comments/header_files/ssl.h +++ b/doc/dox_comments/header_files/ssl.h @@ -568,6 +568,26 @@ WOLFSSL_API int wolfSSL_use_old_poly(WOLFSSL*, int); WOLFSSL_API int wolfSSL_dtls_import(WOLFSSL* ssl, unsigned char* buf, unsigned int sz); + +/*! + \brief Used to import a serialized TLS session. In most cases + wolfSSL_get_session should be used instead, this function is for exporting + the state of the connection and when imported a resumption is not needed. + WARNING: buf contains sensitive information about the state and is best to + be encrypted before storing if stored. + + \return the number of bytes read from buffer 'buf' + + \param ssl WOLFSSL structure to import the session into + \param buf serialized session + \param sz size of buffer 'buf' + + \sa wolfSSL_dtls_import + \sa wolfSSL_tls_export + */ +WOLFSSL_API int wolfSSL_tls_import(WOLFSSL* ssl, const unsigned char* buf, + unsigned int sz); + /*! \brief The wolfSSL_CTX_dtls_set_export() function is used to set the callback function for exporting a session. It is allowed to @@ -680,6 +700,23 @@ WOLFSSL_API int wolfSSL_dtls_set_export(WOLFSSL* ssl, wc_dtls_export func); WOLFSSL_API int wolfSSL_dtls_export(WOLFSSL* ssl, unsigned char* buf, unsigned int* sz); +/*! + \brief Used to export a serialized TLS session. In most cases + wolfSSL_set_session should be used instead, this function is for importing a + serialized state of the connection. + + \return the number of bytes written into buffer 'buf' + + \param ssl WOLFSSL structure to export the session from + \param buf output of serialized session + \param sz size in bytes set in 'buf' + + \sa wolfSSL_dtls_import + \sa wolfSSL_tls_import + */ +WOLFSSL_API int wolfSSL_tls_export(WOLFSSL* ssl, unsigned char* buf, + unsigned int* sz); + /*! \brief This function is used to set aside static memory for a CTX. Memory set aside is then used for the CTX’s lifetime and for any SSL objects