aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-07-07 08:57:00 -0400
committerMike DePaulo <mikedep333@gmail.com>2015-07-07 09:01:38 -0400
commitf65ff03d106f4cfe162bfde4780426b7bbc2e4ee (patch)
tree571dd0bd95a0341fcb1817a3a17df69b1d43e3de /openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
parent4241d28e545a02eb753c8f713149e20747f044b6 (diff)
downloadvcxsrv-f65ff03d106f4cfe162bfde4780426b7bbc2e4ee.tar.gz
vcxsrv-f65ff03d106f4cfe162bfde4780426b7bbc2e4ee.tar.bz2
vcxsrv-f65ff03d106f4cfe162bfde4780426b7bbc2e4ee.zip
Update openssl: 1.0.1m -> 1.0.1o
Diffstat (limited to 'openssl/crypto/evp/e_aes_cbc_hmac_sha1.c')
-rw-r--r--openssl/crypto/evp/e_aes_cbc_hmac_sha1.c9
1 files changed, 6 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 3f8a5ae39..d1f5928f6 100644
--- a/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c
@@ -503,7 +503,12 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
case EVP_CTRL_AEAD_TLS1_AAD:
{
unsigned char *p = ptr;
- unsigned int len = p[arg - 2] << 8 | p[arg - 1];
+ unsigned int len;
+
+ if (arg != EVP_AEAD_TLS1_AAD_LEN)
+ return -1;
+
+ len = p[arg - 2] << 8 | p[arg - 1];
if (ctx->encrypt) {
key->payload_length = len;
@@ -520,8 +525,6 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
AES_BLOCK_SIZE) & -AES_BLOCK_SIZE)
- len);
} else {
- if (arg > 13)
- arg = 13;
memcpy(key->aux.tls_aad, ptr, arg);
key->payload_length = arg;