projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove EVP_CHECK_DES_KEY
[oweals/openssl.git]
/
crypto
/
evp
/
e_aes_cbc_hmac_sha256.c
diff --git
a/crypto/evp/e_aes_cbc_hmac_sha256.c
b/crypto/evp/e_aes_cbc_hmac_sha256.c
index 598c096d9e9fd55ffff860836d85cdc086a2d427..e83969de764cce5a2ef706afd7cc5f556af1a65e 100644
(file)
--- a/
crypto/evp/e_aes_cbc_hmac_sha256.c
+++ b/
crypto/evp/e_aes_cbc_hmac_sha256.c
@@
-52,7
+52,7
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-#if !defined(OPENSSL_NO_AES)
&& !defined(OPENSSL_NO_SHA256)
+#if !defined(OPENSSL_NO_AES)
# include <openssl/evp.h>
# include <openssl/objects.h>
# include <openssl/evp.h>
# include <openssl/objects.h>
@@
-94,7
+94,7
@@
typedef struct {
defined(_M_AMD64) || defined(_M_X64) || \
defined(__INTEL__) )
defined(_M_AMD64) || defined(_M_X64) || \
defined(__INTEL__) )
-extern unsigned int OPENSSL_ia32cap_P[
3
];
+extern unsigned int OPENSSL_ia32cap_P[];
# define AESNI_CAPABLE (1<<(57-32))
int aesni_set_encrypt_key(const unsigned char *userKey, int bits,
# define AESNI_CAPABLE (1<<(57-32))
int aesni_set_encrypt_key(const unsigned char *userKey, int bits,
@@
-817,6
+817,11
@@
static int aesni_cbc_hmac_sha256_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
unsigned char *p = ptr;
unsigned int len = p[arg - 2] << 8 | p[arg - 1];
unsigned char *p = ptr;
unsigned int len = p[arg - 2] << 8 | p[arg - 1];
+ if (arg != EVP_AEAD_TLS1_AAD_LEN)
+ return -1;
+
+ len = p[arg - 2] << 8 | p[arg - 1];
+
if (ctx->encrypt) {
key->payload_length = len;
if ((key->aux.tls_ver =
if (ctx->encrypt) {
key->payload_length = len;
if ((key->aux.tls_ver =
@@
-832,8
+837,6
@@
static int aesni_cbc_hmac_sha256_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
AES_BLOCK_SIZE) & -AES_BLOCK_SIZE)
- len);
} else {
AES_BLOCK_SIZE) & -AES_BLOCK_SIZE)
- len);
} else {
- if (arg > 13)
- arg = 13;
memcpy(key->aux.tls_aad, ptr, arg);
key->payload_length = arg;
memcpy(key->aux.tls_aad, ptr, arg);
key->payload_length = arg;