diff options
author | Mike DePaulo <mikedep333@gmail.com> | 2015-07-07 08:57:00 -0400 |
---|---|---|
committer | Mike DePaulo <mikedep333@gmail.com> | 2015-07-07 08:57:00 -0400 |
commit | ddb34d947fe45fcc4d2a8da284e7fa0c001bb7d3 (patch) | |
tree | ca8fc6529b2ff894f5264dbce5b53d3e595ee1c9 /openssl/crypto/evp/e_aes.c | |
parent | bbc50e3219a2e7801f4e636fe90df08fe3a28323 (diff) | |
download | vcxsrv-ddb34d947fe45fcc4d2a8da284e7fa0c001bb7d3.tar.gz vcxsrv-ddb34d947fe45fcc4d2a8da284e7fa0c001bb7d3.tar.bz2 vcxsrv-ddb34d947fe45fcc4d2a8da284e7fa0c001bb7d3.zip |
Update openssl: 1.0.1m -> 1.0.1o
Diffstat (limited to 'openssl/crypto/evp/e_aes.c')
-rw-r--r-- | openssl/crypto/evp/e_aes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openssl/crypto/evp/e_aes.c b/openssl/crypto/evp/e_aes.c index 245c18a69..1ede7bd39 100644 --- a/openssl/crypto/evp/e_aes.c +++ b/openssl/crypto/evp/e_aes.c @@ -50,6 +50,7 @@ #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_AES +#include <openssl/crypto.h> # include <openssl/evp.h> # include <openssl/err.h> # include <string.h> @@ -753,7 +754,7 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) case EVP_CTRL_AEAD_TLS1_AAD: /* Save the AAD for later use */ - if (arg != 13) + if (arg != EVP_AEAD_TLS1_AAD_LEN) return 0; memcpy(c->buf, ptr, arg); gctx->tls_aad_len = arg; @@ -914,7 +915,7 @@ static int aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, /* Retrieve tag */ CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, EVP_GCM_TLS_TAG_LEN); /* If tag mismatch wipe buffer */ - if (memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN)) { + if (CRYPTO_memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN)) { OPENSSL_cleanse(out, len); goto err; } @@ -1259,7 +1260,7 @@ static int aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, !CRYPTO_ccm128_decrypt(ccm, in, out, len)) { unsigned char tag[16]; if (CRYPTO_ccm128_tag(ccm, tag, cctx->M)) { - if (!memcmp(tag, ctx->buf, cctx->M)) + if (!CRYPTO_memcmp(tag, ctx->buf, cctx->M)) rv = len; } } |