Change-Id: I7af2c87fe6e7513aa2603d5e845a4db87ab14fcc Reviewed-on: https://boringssl-review.googlesource.com/7101 Reviewed-by: David Benjamin <davidben@google.com>kris/onging/CECPQ3_patch15
@@ -138,7 +138,7 @@ static bool TestOperation(FileTest *t, | |||||
iv.size(), 0)) { | iv.size(), 0)) { | ||||
return false; | return false; | ||||
} | } | ||||
} else if (iv.size() != (size_t)EVP_CIPHER_CTX_iv_length(ctx.get())) { | |||||
} else if (iv.size() != EVP_CIPHER_CTX_iv_length(ctx.get())) { | |||||
t->PrintLine("Bad IV length."); | t->PrintLine("Bad IV length."); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -384,7 +384,7 @@ static int aes_ecb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, | |||||
static int aes_ctr_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, | static int aes_ctr_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, | ||||
size_t len) { | size_t len) { | ||||
unsigned int num = ctx->num; | |||||
unsigned num = (unsigned)ctx->num; | |||||
EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data; | EVP_AES_KEY *dat = (EVP_AES_KEY *)ctx->cipher_data; | ||||
if (dat->stream.ctr) { | if (dat->stream.ctr) { | ||||
@@ -394,7 +394,7 @@ static int aes_ctr_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, | |||||
CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, ctx->iv, ctx->buf, &num, | CRYPTO_ctr128_encrypt(in, out, len, &dat->ks, ctx->iv, ctx->buf, &num, | ||||
dat->block); | dat->block); | ||||
} | } | ||||
ctx->num = (size_t)num; | |||||
ctx->num = (int)num; | |||||
return 1; | return 1; | ||||
} | } | ||||
@@ -95,7 +95,7 @@ int RSA_padding_add_PKCS1_type_1(uint8_t *to, unsigned to_len, | |||||
memset(p, 0xff, j); | memset(p, 0xff, j); | ||||
p += j; | p += j; | ||||
*(p++) = 0; | *(p++) = 0; | ||||
memcpy(p, from, (unsigned int)from_len); | |||||
memcpy(p, from, from_len); | |||||
return 1; | return 1; | ||||
} | } | ||||
@@ -189,7 +189,7 @@ int RSA_padding_add_PKCS1_type_2(uint8_t *to, unsigned to_len, | |||||
*(p++) = 0; | *(p++) = 0; | ||||
memcpy(p, from, (unsigned int)from_len); | |||||
memcpy(p, from, from_len); | |||||
return 1; | return 1; | ||||
} | } | ||||
@@ -271,7 +271,7 @@ int RSA_padding_add_none(uint8_t *to, unsigned to_len, const uint8_t *from, | |||||
return 0; | return 0; | ||||
} | } | ||||
memcpy(to, from, (unsigned int)from_len); | |||||
memcpy(to, from, from_len); | |||||
return 1; | return 1; | ||||
} | } | ||||