Skip to content
Commit 3d004cef authored by Matt Caswell's avatar Matt Caswell
Browse files

Use the same encryption growth macro consistently



We had two different macros for calculating the potential growth due to
encryption. The macro we use for allocating the underlying buffer should be
the same one that we use for reserving bytes for encryption growth.

Also if we are adding the MAC independently of the cipher algorithm then
the encryption growth will not include that MAC so we should remove it
from the amount of bytes that we reserve for that growth. Otherwise we
might exceed our buffer size and the WPACKET_reserve operation will
fail.

Reviewed-by: default avatarHugo Landau <hlandau@openssl.org>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
Reviewed-by: default avatarPaul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19264)
parent a05e2aa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment