summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-06-30 22:44:47 +0200
committerSimon Josefsson <simon@josefsson.org>2008-06-30 22:44:47 +0200
commit0fee3917077e191dea3c9787c95c072979532086 (patch)
tree013dc7758e9ca2d6c0982371d522ed2d75c47dd6
parent3bfdbe4172dae993e0b946242921406ddb0a1074 (diff)
downloadgnutls-0fee3917077e191dea3c9787c95c072979532086.tar.gz
(_gnutls_handshake_hash_buffers_clear): Make sure deinitialized MAC hashes are initialized.
Report and tiny patch from Tomas Mraz <tmraz@redhat.com>.
-rw-r--r--lib/gnutls_handshake.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index d7981802a0..0192c9f61e 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -69,11 +69,12 @@ int _gnutls_server_select_comp_method (gnutls_session_t session,
/* Clears the handshake hash buffers and handles.
*/
-inline static void
+static void
_gnutls_handshake_hash_buffers_clear (gnutls_session_t session)
{
_gnutls_hash_deinit (&session->internals.handshake_mac_handle_md5, NULL);
_gnutls_hash_deinit (&session->internals.handshake_mac_handle_sha, NULL);
+ session->internals.handshake_mac_handle_init = 0;
_gnutls_handshake_buffer_clear (session);
}