commit 4866ea1fef107ddca0f5aa3dcb187c6fd7f4afe1
parent 0dafbfbb9588b4e7966a2a19fceedccfb477ad91
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 24 Jan 2009 02:19:46 +0000
support NULL MAC properly
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/daemon/https/tls/gnutls_cipher.c b/src/daemon/https/tls/gnutls_cipher.c
@@ -479,7 +479,8 @@ MHD_gtls_ciphertext2compressed (MHD_gtls_session_t session,
/* HMAC was not the same.
*/
- if (memcmp (MAC, &ciphertext.data[length], hash_size) != 0)
+ if ( (td != GNUTLS_MAC_FAILED) &&
+ (memcmp (MAC, &ciphertext.data[length], hash_size) != 0) )
{
MHD_gnutls_assert ();
return GNUTLS_E_DECRYPTION_FAILED;