mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Remove restriction on value of MBEDTLS_SSL_CID_PADDING_GRANULARITY
This commit is contained in:
@ -2013,9 +2013,9 @@ static int ssl_cid_build_inner_plaintext( unsigned char *content,
|
||||
uint8_t rec_type )
|
||||
{
|
||||
size_t len = *content_size;
|
||||
|
||||
/* MBEDTLS_SSL_CID_PADDING_GRANULARITY must be a power of 2. */
|
||||
size_t pad = ~len & ( MBEDTLS_SSL_CID_PADDING_GRANULARITY - 1 );
|
||||
size_t pad = ( MBEDTLS_SSL_CID_PADDING_GRANULARITY -
|
||||
( len + 1 ) % MBEDTLS_SSL_CID_PADDING_GRANULARITY ) %
|
||||
MBEDTLS_SSL_CID_PADDING_GRANULARITY;
|
||||
|
||||
/* Write real content type */
|
||||
if( remaining == 0 )
|
||||
|
Reference in New Issue
Block a user