aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-15 14:13:55 +0200
committermarha <marha@users.sourceforge.net>2012-06-15 14:13:55 +0200
commit1501699f035761714a1d4540d65a1afb7c567abe (patch)
tree4dd4d15583d9d542a699833331f34ceb10bbd6c3 /openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
parent38c18d1733e4eb5cc560a34bfe2470e01a06205d (diff)
parenta33de30073bfa0ee1abba186dba9fa52cf0aa23a (diff)
downloadvcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.tar.gz
vcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.tar.bz2
vcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.zip
Merge remote-tracking branch 'origin/released'
Conflicts: freetype/src/raster/ftraster.c openssl/Makefile
Diffstat (limited to 'openssl/crypto/evp/e_aes_cbc_hmac_sha1.c')
-rw-r--r--openssl/crypto/evp/e_aes_cbc_hmac_sha1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c b/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
index 278c6caa2..710fb79ba 100644
--- a/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
@@ -83,6 +83,8 @@ typedef struct
} aux;
} EVP_AES_HMAC_SHA1;
+#define NO_PAYLOAD_LENGTH ((size_t)-1)
+
#if defined(AES_ASM) && ( \
defined(__x86_64) || defined(__x86_64__) || \
defined(_M_AMD64) || defined(_M_X64) || \
@@ -124,7 +126,7 @@ static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
key->tail = key->head;
key->md = key->head;
- key->payload_length = 0;
+ key->payload_length = NO_PAYLOAD_LENGTH;
return ret<0?0:1;
}
@@ -185,7 +187,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
if (len%AES_BLOCK_SIZE) return 0;
if (ctx->encrypt) {
- if (plen==0)
+ if (plen==NO_PAYLOAD_LENGTH)
plen = len;
else if (len!=((plen+SHA_DIGEST_LENGTH+AES_BLOCK_SIZE)&-AES_BLOCK_SIZE))
return 0;
@@ -271,7 +273,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
}
- key->payload_length = 0;
+ key->payload_length = NO_PAYLOAD_LENGTH;
return 1;
}