Use MBEDTLS_ namespace for internal CID length constant

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

View file

@ -646,9 +646,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
@ -664,7 +664,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

@ -2049,7 +2049,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 )
@ -2095,7 +2095,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;
@ -2532,7 +2532,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)