Convert ssl3_cbc_digest_record for size_t
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
72716e79bf
commit
d0e7c31db0
2 changed files with 9 additions and 7 deletions
14
ssl/s3_cbc.c
14
ssl/s3_cbc.c
|
@ -134,7 +134,7 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx,
|
|||
size_t data_plus_mac_size,
|
||||
size_t data_plus_mac_plus_padding_size,
|
||||
const unsigned char *mac_secret,
|
||||
unsigned mac_secret_length, char is_sslv3)
|
||||
size_t mac_secret_length, char is_sslv3)
|
||||
{
|
||||
union {
|
||||
double align;
|
||||
|
@ -142,23 +142,24 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx,
|
|||
} md_state;
|
||||
void (*md_final_raw) (void *ctx, unsigned char *md_out);
|
||||
void (*md_transform) (void *ctx, const unsigned char *block);
|
||||
unsigned md_size, md_block_size = 64;
|
||||
unsigned sslv3_pad_length = 40, header_length, variance_blocks,
|
||||
size_t md_size, md_block_size = 64;
|
||||
size_t sslv3_pad_length = 40, header_length, variance_blocks,
|
||||
len, max_mac_bytes, num_blocks,
|
||||
num_starting_blocks, k, mac_end_offset, c, index_a, index_b;
|
||||
unsigned int bits; /* at most 18 bits */
|
||||
size_t bits; /* at most 18 bits */
|
||||
unsigned char length_bytes[MAX_HASH_BIT_COUNT_BYTES];
|
||||
/* hmac_pad is the masked HMAC key. */
|
||||
unsigned char hmac_pad[MAX_HASH_BLOCK_SIZE];
|
||||
unsigned char first_block[MAX_HASH_BLOCK_SIZE];
|
||||
unsigned char mac_out[EVP_MAX_MD_SIZE];
|
||||
unsigned i, j, md_out_size_u;
|
||||
size_t i, j;
|
||||
unsigned md_out_size_u;
|
||||
EVP_MD_CTX *md_ctx = NULL;
|
||||
/*
|
||||
* mdLengthSize is the number of bytes in the length field that
|
||||
* terminates * the hash.
|
||||
*/
|
||||
unsigned md_length_size = 8;
|
||||
size_t md_length_size = 8;
|
||||
char length_is_big_endian = 1;
|
||||
int ret;
|
||||
|
||||
|
@ -471,6 +472,7 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx,
|
|||
|| EVP_DigestUpdate(md_ctx, mac_out, md_size) <= 0)
|
||||
goto err;
|
||||
}
|
||||
/* TODO(size_t): Convert me */
|
||||
ret = EVP_DigestFinal(md_ctx, md_out, &md_out_size_u);
|
||||
if (ret && md_out_size)
|
||||
*md_out_size = md_out_size_u;
|
||||
|
|
|
@ -2101,7 +2101,7 @@ __owur int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx,
|
|||
size_t data_plus_mac_size,
|
||||
size_t data_plus_mac_plus_padding_size,
|
||||
const unsigned char *mac_secret,
|
||||
unsigned mac_secret_length, char is_sslv3);
|
||||
size_t mac_secret_length, char is_sslv3);
|
||||
|
||||
__owur int tls_fips_digest_extra(const EVP_CIPHER_CTX *cipher_ctx,
|
||||
EVP_MD_CTX *mac_ctx, const unsigned char *data,
|
||||
|
|
Loading…
Reference in a new issue