提交 58f4698f 编写于 作者: D Dr. Stephen Henson

Make *Final work for key wrap again.

Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 d12eef15
......@@ -2097,6 +2097,8 @@ static int aes_wrap_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
EVP_AES_WRAP_CTX *wctx = ctx->cipher_data;
size_t rv;
if (!in)
return 0;
if (inlen % 8)
return -1;
if (ctx->encrypt && inlen < 8)
......@@ -2110,8 +2112,6 @@ static int aes_wrap_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
else
return inlen - 8;
}
if (!in)
return 0;
if (ctx->encrypt)
rv = CRYPTO_128_wrap(&wctx->ks.ks, wctx->iv, out, in, inlen,
(block128_f)AES_encrypt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册