aboutsummaryrefslogtreecommitdiff
path: root/crypto/evp/e_aes.c
diff options
context:
space:
mode:
authorPatrick Steuer <patrick.steuer@de.ibm.com>2018-03-28 13:21:29 +0100
committerAndy Polyakov <appro@openssl.org>2018-03-28 23:31:05 +0200
commit258689931ef9f25f282b550367f9c815b91069d7 (patch)
treec19f6d55a37252e9d9b63b17b0752e42ca674893 /crypto/evp/e_aes.c
parent74d38a8677ac10f7368c12079af9a27e959ee295 (diff)
downloadopenssl-258689931ef9f25f282b550367f9c815b91069d7.zip
openssl-258689931ef9f25f282b550367f9c815b91069d7.tar.gz
openssl-258689931ef9f25f282b550367f9c815b91069d7.tar.bz2
crypto/evp/e_aes.c: add size_t casts to increase readability
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5250)
Diffstat (limited to 'crypto/evp/e_aes.c')
-rw-r--r--crypto/evp/e_aes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index 913242e..6f9cb6d 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -1407,7 +1407,7 @@ static int s390x_aes_gcm_aad(S390X_AES_GCM_CTX *ctx, const unsigned char *aad,
rem = len & 0xf;
- len &= ~0xf;
+ len &= ~(size_t)0xf;
if (len) {
s390x_kma(aad, len, NULL, 0, NULL, ctx->fc, &ctx->kma.param);
aad += len;
@@ -1479,7 +1479,7 @@ static int s390x_aes_gcm(S390X_AES_GCM_CTX *ctx, const unsigned char *in,
rem = len & 0xf;
- len &= ~0xf;
+ len &= ~(size_t)0xf;
if (len) {
s390x_kma(ctx->ares, ctx->areslen, in, len, out,
ctx->fc | S390X_KMA_LAAD, &ctx->kma.param);
@@ -1965,7 +1965,7 @@ static void s390x_aes_ccm_aad(S390X_AES_CCM_CTX *ctx, const unsigned char *aad,
ctx->aes.ccm.blocks += 2;
rem = alen & 0xf;
- alen &= ~0xf;
+ alen &= ~(size_t)0xf;
if (alen) {
s390x_kmac(aad, alen, ctx->aes.ccm.fc, &ctx->aes.ccm.kmac_param);
ctx->aes.ccm.blocks += alen >> 4;
@@ -2027,7 +2027,7 @@ static int s390x_aes_ccm(S390X_AES_CCM_CTX *ctx, const unsigned char *in,
num = 0;
rem = len & 0xf;
- len &= ~0xf;
+ len &= ~(size_t)0xf;
if (enc) {
/* mac-then-encrypt */