提交 ebf7bd7f 编写于 作者: M Matt Caswell

Fix dasync engine

The aes128_cbc_hmac_sha1 cipher in the dasync engine is broken. Probably
by commit e38c2e85 which removed use of the "enc" variable...but not
completely.
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/8291)

(cherry picked from commit 695dd3a332fdd54b873fd0d08f9ae720141f24cd)
上级 143ee7b6
...@@ -138,7 +138,6 @@ struct dasync_pipeline_ctx { ...@@ -138,7 +138,6 @@ struct dasync_pipeline_ctx {
unsigned char **inbufs; unsigned char **inbufs;
unsigned char **outbufs; unsigned char **outbufs;
size_t *lens; size_t *lens;
int enc;
unsigned char tlsaad[SSL_MAX_PIPELINES][EVP_AEAD_TLS1_AAD_LEN]; unsigned char tlsaad[SSL_MAX_PIPELINES][EVP_AEAD_TLS1_AAD_LEN];
unsigned int aadctr; unsigned int aadctr;
}; };
...@@ -603,7 +602,7 @@ static int dasync_cipher_ctrl_helper(EVP_CIPHER_CTX *ctx, int type, int arg, ...@@ -603,7 +602,7 @@ static int dasync_cipher_ctrl_helper(EVP_CIPHER_CTX *ctx, int type, int arg,
len = p[arg - 2] << 8 | p[arg - 1]; len = p[arg - 2] << 8 | p[arg - 1];
if (pipe_ctx->enc) { if (EVP_CIPHER_CTX_encrypting(ctx)) {
if ((p[arg - 4] << 8 | p[arg - 3]) >= TLS1_1_VERSION) { if ((p[arg - 4] << 8 | p[arg - 3]) >= TLS1_1_VERSION) {
if (len < AES_BLOCK_SIZE) if (len < AES_BLOCK_SIZE)
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册