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:12:39 +0000 (23:12 +0100)
commitc8269881093324b881b81472be037055571f73f3
treec427132f22ce43de444522428b0c1fe6c193402d
parent873fb39f20b6763daba226b74e83fb194924c7bf
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>
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
include/openssl/evp.h
ssl/record/ssl3_record.c