From 898a9c892bcae6e2eebaf5eecfb3a7515c6acad3 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Fri, 19 Sep 2008 13:56:56 +0200 Subject: Make _gnutls_hash_copy work with registered hashes. --- lib/gnutls_hash_int.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gnutls_hash_int.c b/lib/gnutls_hash_int.c index 3e217f874e..5ae4e6b1eb 100644 --- a/lib/gnutls_hash_int.c +++ b/lib/gnutls_hash_int.c @@ -126,6 +126,7 @@ _gnutls_hash_copy (digest_hd_st * dst, digest_hd_st * src) if (src->registered) { + dst->hd.rh.cc = src->hd.rh.cc; return src->hd.rh.cc->copy (&dst->hd.rh.ctx, src->hd.rh.ctx); } @@ -144,7 +145,7 @@ _gnutls_hash_copy (digest_hd_st * dst, digest_hd_st * src) void _gnutls_hash_output (digest_hd_st * handle, void *digest) { - int maclen; + size_t maclen; maclen = _gnutls_hash_get_algo_len (handle->algorithm); -- cgit v1.2.1