aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-01-24 02:19:46 +0000
committerChristian Grothoff <christian@grothoff.org>2009-01-24 02:19:46 +0000
commit4866ea1fef107ddca0f5aa3dcb187c6fd7f4afe1 (patch)
treedc0133d8c1a00c7dc13e44016b6ad87c7246b9f1
parent0dafbfbb9588b4e7966a2a19fceedccfb477ad91 (diff)
downloadlibmicrohttpd-4866ea1fef107ddca0f5aa3dcb187c6fd7f4afe1.tar.gz
libmicrohttpd-4866ea1fef107ddca0f5aa3dcb187c6fd7f4afe1.zip
support NULL MAC properly
-rw-r--r--src/daemon/https/tls/gnutls_cipher.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemon/https/tls/gnutls_cipher.c b/src/daemon/https/tls/gnutls_cipher.c
index 6edc0efe..5004d13c 100644
--- 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,
479 479
480 /* HMAC was not the same. 480 /* HMAC was not the same.
481 */ 481 */
482 if (memcmp (MAC, &ciphertext.data[length], hash_size) != 0) 482 if ( (td != GNUTLS_MAC_FAILED) &&
483 (memcmp (MAC, &ciphertext.data[length], hash_size) != 0) )
483 { 484 {
484 MHD_gnutls_assert (); 485 MHD_gnutls_assert ();
485 return GNUTLS_E_DECRYPTION_FAILED; 486 return GNUTLS_E_DECRYPTION_FAILED;