mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-12 21:42:15 +00:00
Splitting buffers comment added
Signed-off-by: Shelly Liberman <shelly.liberman@arm.com>
This commit is contained in:
parent
c6a7e6b0c4
commit
3799fc1578
|
@ -11272,6 +11272,10 @@ static int ssl_write_real( mbedtls_ssl_context *ssl,
|
||||||
mbedtls_platform_memcpy( ssl->out_msg, buf, len );
|
mbedtls_platform_memcpy( ssl->out_msg, buf, len );
|
||||||
|
|
||||||
#if defined(MBEDTLS_FI_COUNTERMEASURES) && !defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING)
|
#if defined(MBEDTLS_FI_COUNTERMEASURES) && !defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING)
|
||||||
|
/*
|
||||||
|
* Buffer pointer and size duplication cannot be supported with MBEDTLS_SSL_CBC_RECORD_SPLITTING.
|
||||||
|
* After splitting pointers and data size will not be the same as initaly provides by user.
|
||||||
|
*/
|
||||||
/* Secure against buffer substitution */
|
/* Secure against buffer substitution */
|
||||||
if( buf == ssl->out_msg_dup &&
|
if( buf == ssl->out_msg_dup &&
|
||||||
ssl->out_msglen == ssl->out_msglen_dup &&
|
ssl->out_msglen == ssl->out_msglen_dup &&
|
||||||
|
@ -11350,6 +11354,10 @@ int mbedtls_ssl_write( mbedtls_ssl_context *ssl, const unsigned char *buf, size_
|
||||||
{
|
{
|
||||||
int ret = MBEDTLS_ERR_PLATFORM_FAULT_DETECTED;
|
int ret = MBEDTLS_ERR_PLATFORM_FAULT_DETECTED;
|
||||||
#if defined(MBEDTLS_FI_COUNTERMEASURES) && !defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING)
|
#if defined(MBEDTLS_FI_COUNTERMEASURES) && !defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING)
|
||||||
|
/*
|
||||||
|
* Buffer pointer and size duplication cannot be supported with MBEDTLS_SSL_CBC_RECORD_SPLITTING.
|
||||||
|
* After splitting pointers and data size will not be the same as initaly provides by user.
|
||||||
|
*/
|
||||||
volatile const unsigned char *buf_dup = buf;
|
volatile const unsigned char *buf_dup = buf;
|
||||||
volatile size_t len_dup = len;
|
volatile size_t len_dup = len;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue