Reduce minimal out length in CRYPTO_128_unwrap_pad
authorYihong Wang <yh.wang@ibm.com>
Wed, 16 May 2018 06:34:28 +0000 (23:34 -0700)
committerAndy Polyakov <appro@openssl.org>
Wed, 30 May 2018 21:16:52 +0000 (23:16 +0200)
commita133883752af41ae20bcee8153bc52e8a4b522c8
treea60a1694879a51f3ce44886526b9b3f1a4e00514
parent848113a30b431c2fe21ae8de2a366b9b6146fb92
Reduce minimal out length in CRYPTO_128_unwrap_pad

In `aes_wrap_cipher()`, the minimal out buff length is `(inlen - 8)`.
Since it calls `CRYPTO_128_unwrap_pad()` underneath, it makes sense to
reduce the minimal out length in `CRYPTO_128_unwrap_pad()` to align to
its caller.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6266)
crypto/modes/wrap128.c