Fix GnuTLS test suite with GnuTLS versions 3.4.x

* src/gnutls.c (gnutls_cipher_get_tag_size): Make it return
zero only for versions of GnuTLS < 3.2.2, where
gnutls_cipher_get_tag_size was introduced.  This fixes the
GnuTLS test suite, which assumes that any cipher whose tag
size is non-zero is AEAD-capable, and doesn't test such ciphers
if AEAD is not available, i.e. for GnuTLS < 3.5.1.  (Bug#32446)
This commit is contained in:
Eli Zaretskii 2018-09-18 13:24:29 +03:00
parent b5bee6bf48
commit d4fa83baf5

View file

@ -38,8 +38,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
So, require 3.5.1. */ So, require 3.5.1. */
#if GNUTLS_VERSION_NUMBER >= 0x030501 #if GNUTLS_VERSION_NUMBER >= 0x030501
# define HAVE_GNUTLS_AEAD # define HAVE_GNUTLS_AEAD
#else #elif GNUTLS_VERSION_NUMBER < 0x030202
/* gnutls_cipher_get_tag_size was introduced in 3.2.0, but it's only /* gnutls_cipher_get_tag_size was introduced in 3.2.2, but it's only
relevant for AEAD ciphers. */ relevant for AEAD ciphers. */
# define gnutls_cipher_get_tag_size(cipher) 0 # define gnutls_cipher_get_tag_size(cipher) 0
#endif #endif