Use MBEDTLS_ namespace for internal CID length constant

This commit is contained in:
Hanno Becker 2019-04-30 15:01:51 +01:00
parent d91dc3767f
commit 2e7cd5aa4c
2 changed files with 6 additions and 6 deletions

View File

@ -611,9 +611,9 @@ struct mbedtls_ssl_transform
*
*/
#if MBEDTLS_SSL_CID_OUT_LEN_MAX > MBEDTLS_SSL_CID_IN_LEN_MAX
#define SSL_CID_LEN_MAX MBEDTLS_SSL_CID_OUT_LEN_MAX
#define MBEDTLS_SSL_CID_LEN_MAX MBEDTLS_SSL_CID_OUT_LEN_MAX
#else
#define SSL_CID_LEN_MAX MBEDTLS_SSL_CID_IN_LEN_MAX
#define MBEDTLS_SSL_CID_LEN_MAX MBEDTLS_SSL_CID_IN_LEN_MAX
#endif
typedef struct
@ -629,7 +629,7 @@ typedef struct
#if defined(MBEDTLS_SSL_CID)
uint8_t cid_len;
unsigned char cid[ SSL_CID_LEN_MAX ];
unsigned char cid[ MBEDTLS_SSL_CID_LEN_MAX ];
#endif /* MBEDTLS_SSL_CID */
} mbedtls_record;

View File

@ -1627,7 +1627,7 @@ static int ssl_cid_parse_inner_plaintext( unsigned char const *content,
}
#endif /* MBEDTLS_SSL_CID */
/* add_data must have size ( 13 + SSL_CID_LEN_MAX ) Bytes */
/* add_data must have size ( 13 + MBEDTLS_SSL_CID_LEN_MAX ) Bytes */
static void ssl_extract_add_data_from_record( unsigned char* add_data,
size_t *add_data_len,
mbedtls_record *rec )
@ -1673,7 +1673,7 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
mbedtls_cipher_mode_t mode;
int auth_done = 0;
unsigned char * data;
unsigned char add_data[13 + SSL_CID_LEN_MAX ];
unsigned char add_data[13 + MBEDTLS_SSL_CID_LEN_MAX ];
size_t add_data_len;
size_t post_avail;
@ -2110,7 +2110,7 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context *ssl,
size_t padlen = 0, correct = 1;
#endif
unsigned char* data;
unsigned char add_data[13 + SSL_CID_LEN_MAX ];
unsigned char add_data[13 + MBEDTLS_SSL_CID_LEN_MAX ];
size_t add_data_len;
#if !defined(MBEDTLS_DEBUG_C)