Sanity check EVP_CTRL_AEAD_TLS_AAD
authorMatt Caswell <matt@openssl.org>
Mon, 27 Apr 2015 10:07:06 +0000 (11:07 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 30 Apr 2015 22:21:50 +0000 (23:21 +0100)
commit1a3701f4fe0530a40ec073cd78d02cfcc26c0f8e
treee65bb7e707aa8c54541abb9699a7a1cf45f5d9ee
parent4ce06271aac5ebddf02854191611613af5ec83f8
Sanity check EVP_CTRL_AEAD_TLS_AAD

The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at
least 13 bytes long. Add sanity checks to ensure that the length is at
least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to
represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) and
Paramjot Oberoi (Int3 Solutions) for reporting this issue.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit c8269881093324b881b81472be037055571f73f3)

Conflicts:
ssl/record/ssl3_record.c
apps/speed.c
crypto/evp/e_aes.c
crypto/evp/e_aes_cbc_hmac_sha1.c
crypto/evp/e_aes_cbc_hmac_sha256.c
crypto/evp/e_rc4_hmac_md5.c
crypto/evp/evp.h
ssl/t1_enc.c