mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 23:55:36 +00:00
Don't quote DTLSInnerPlaintext structure multiple times
This commit is contained in:
parent
8969369a83
commit
7dc2577f01
|
@ -1597,14 +1597,8 @@ static int ssl_cid_build_inner_plaintext( unsigned char *content,
|
|||
return( 0 );
|
||||
}
|
||||
|
||||
/* This function parses a DTLSInnerPlaintext structure
|
||||
*
|
||||
* struct {
|
||||
* opaque content[DTLSPlaintext.length];
|
||||
* ContentType real_type;
|
||||
* uint8 zeros[length_of_padding];
|
||||
* } DTLSInnerPlaintext;
|
||||
*/
|
||||
/* This function parses a DTLSInnerPlaintext structure.
|
||||
* See ssl_cid_build_inner_plaintext() for details. */
|
||||
static int ssl_cid_parse_inner_plaintext( unsigned char const *content,
|
||||
size_t *content_size,
|
||||
uint8_t *rec_type )
|
||||
|
@ -1740,20 +1734,11 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
|
|||
if( rec->cid_len != 0 )
|
||||
{
|
||||
/*
|
||||
* Wrap plaintext into DTLSInnerPlaintext structure
|
||||
* Wrap plaintext into DTLSInnerPlaintext structure.
|
||||
* See ssl_cid_build_inner_plaintext() for more information.
|
||||
*
|
||||
* struct {
|
||||
* opaque content[DTLSPlaintext.length];
|
||||
* ContentType real_type;
|
||||
* uint8 zeros[length_of_padding];
|
||||
* } DTLSInnerPlaintext;
|
||||
*
|
||||
* and change the record content type.
|
||||
*
|
||||
* The rest of the record encryption stays
|
||||
* unmodified (apart from the inclusion of
|
||||
* the CID into the additional data for the
|
||||
* record MAC).
|
||||
* Note that this changes `rec->data_len`, and hence
|
||||
* `post_avail` needs to be recalculated afterwards.
|
||||
*/
|
||||
if( ssl_cid_build_inner_plaintext( data,
|
||||
&rec->data_len,
|
||||
|
|
Loading…
Reference in a new issue