Merge 'mbedtls/development' into merge-crypto-unremoved-20200304

Merge the latest state of the target branch (mbedtls/development) into the
pull request to merge mbed-crypto into mbedtls.

Conflicts:

* ChangeLog: add/add conflict. Resolve by using the usual section order.
This commit is contained in:
Gilles Peskine 2020-03-23 18:02:07 +01:00
commit 5e7d6fd240
16 changed files with 717 additions and 63 deletions

View file

@ -1215,6 +1215,9 @@ struct mbedtls_ssl_context
int in_msgtype; /*!< record header: message type */
size_t in_msglen; /*!< record header: message length */
size_t in_left; /*!< amount of data read so far */
#if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)
size_t in_buf_len; /*!< length of input buffer */
#endif
#if defined(MBEDTLS_SSL_PROTO_DTLS)
uint16_t in_epoch; /*!< DTLS epoch for incoming records */
size_t next_record_offset; /*!< offset of the next record in datagram
@ -1254,6 +1257,9 @@ struct mbedtls_ssl_context
int out_msgtype; /*!< record header: message type */
size_t out_msglen; /*!< record header: message length */
size_t out_left; /*!< amount of data not yet written */
#if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)
size_t out_buf_len; /*!< length of output buffer */
#endif
unsigned char cur_out_ctr[8]; /*!< Outgoing record sequence number. */
@ -3733,7 +3739,14 @@ int mbedtls_ssl_renegotiate( mbedtls_ssl_context *ssl );
*
* \return The (positive) number of bytes read if successful.
* \return \c 0 if the read end of the underlying transport was closed
* - in this case you must stop using the context (see below).
* without sending a CloseNotify beforehand, which might happen
* because of various reasons (internal error of an underlying
* stack, non-conformant peer not sending a CloseNotify and
* such) - in this case you must stop using the context
* (see below).
* \return #MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY if the underlying
* transport is still functional, but the peer has
* acknowledged to not send anything anymore.
* \return #MBEDTLS_ERR_SSL_WANT_READ or #MBEDTLS_ERR_SSL_WANT_WRITE
* if the handshake is incomplete and waiting for data to
* be available for reading from or writing to the underlying