mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-19 07:27:58 +00:00
Fix types and comments about read_timeout
This commit is contained in:
parent
6c1fa3a184
commit
2707430a4d
|
@ -770,8 +770,7 @@ struct _ssl_context
|
||||||
int min_major_ver; /*!< min. major version used */
|
int min_major_ver; /*!< min. major version used */
|
||||||
int min_minor_ver; /*!< min. minor version used */
|
int min_minor_ver; /*!< min. minor version used */
|
||||||
|
|
||||||
unsigned char timeout; /*!< DTLS: initial value of the timeout
|
uint32_t read_timeout; /*!< timeout for ssl_read in milliseconds */
|
||||||
for handshake retransmission */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callbacks (RNG, debug, I/O, verification)
|
* Callbacks (RNG, debug, I/O, verification)
|
||||||
|
@ -1081,9 +1080,8 @@ void ssl_set_endpoint( ssl_context *ssl, int endpoint );
|
||||||
* \note If DTLS is selected and max and/or min version are less
|
* \note If DTLS is selected and max and/or min version are less
|
||||||
* than TLS 1.1 (DTLS 1.0) they are upped to that value.
|
* than TLS 1.1 (DTLS 1.0) they are upped to that value.
|
||||||
*
|
*
|
||||||
* \note Regarding I/O callbacks, you must either [TODO-DTLS:
|
* \note For DTLS, you must either provide a recv callback that
|
||||||
* unimplemented yet: provide a recv callback that doesn't
|
* doesn't block, or one that handles timeouts, see
|
||||||
* block], or one that handles timeouts, see
|
|
||||||
* ssl_set_bio_timeout()
|
* ssl_set_bio_timeout()
|
||||||
*/
|
*/
|
||||||
int ssl_set_transport( ssl_context *ssl, int transport );
|
int ssl_set_transport( ssl_context *ssl, int transport );
|
||||||
|
@ -1179,18 +1177,12 @@ void ssl_set_bio( ssl_context *ssl,
|
||||||
* \param f_recv read callback
|
* \param f_recv read callback
|
||||||
* \param f_recv_timeout read callback with timeout.
|
* \param f_recv_timeout read callback with timeout.
|
||||||
* The last argument of the callback is the timeout in seconds
|
* The last argument of the callback is the timeout in seconds
|
||||||
* \param timeout Value of the recv timeout in seconds. (For DTLS, also the
|
* \param timeout value of the ssl_read() timeout in milliseconds
|
||||||
* initial value of the handshake retransmission timeout.)
|
|
||||||
*
|
*
|
||||||
* \note f_recv_timeout is required for DTLS, [TODO-TLS:
|
* \note f_recv_timeout is required for DTLS, unless f_recv performs
|
||||||
* unimplmented yet: unless f_recv performs non-blocking
|
* non-blocking reads.
|
||||||
* reads].
|
|
||||||
*
|
*
|
||||||
* \note f_recv_timeout must actually block until it receives
|
* \note TODO: timeout not supported with TLS yet
|
||||||
* something or times out (or is interrupted by a signal)
|
|
||||||
*
|
|
||||||
* \note TODO: with TLS, f_recv_timeout and timeout are ignored for
|
|
||||||
* now.
|
|
||||||
*/
|
*/
|
||||||
void ssl_set_bio_timeout( ssl_context *ssl,
|
void ssl_set_bio_timeout( ssl_context *ssl,
|
||||||
void *p_bio,
|
void *p_bio,
|
||||||
|
|
|
@ -4942,7 +4942,7 @@ void ssl_set_bio_timeout( ssl_context *ssl,
|
||||||
ssl->f_send = f_send;
|
ssl->f_send = f_send;
|
||||||
ssl->f_recv = f_recv;
|
ssl->f_recv = f_recv;
|
||||||
ssl->f_recv_timeout = f_recv_timeout;
|
ssl->f_recv_timeout = f_recv_timeout;
|
||||||
ssl->timeout = timeout;
|
ssl->read_timeout = timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ssl_set_session_cache( ssl_context *ssl,
|
void ssl_set_session_cache( ssl_context *ssl,
|
||||||
|
|
Loading…
Reference in a new issue