Fix max_fragment_length with DTLS

This commit is contained in:
Manuel Pégourié-Gonnard 2014-10-13 17:55:52 +02:00 committed by Paul Bakker
parent 23cad339c4
commit 37e08e1689
3 changed files with 60 additions and 7 deletions

View file

@ -1946,6 +1946,12 @@ int ssl_read( ssl_context *ssl, unsigned char *buf, size_t len );
* \note When this function returns POLARSSL_ERR_NET_WANT_WRITE,
* it must be called later with the *same* arguments,
* until it returns a positive value.
*
* \note When DTLS is in use, and a maximum fragment length was
* either set with \c ssl_set_max_frag_len() or negotiated by
* the peer, len must not not be greater than the maximum
* fragment length, or POLARSSL_ERR_SSL_BAD_INPUT_DATA is
* returned.
*/
int ssl_write( ssl_context *ssl, const unsigned char *buf, size_t len );