summaryrefslogtreecommitdiff
path: root/cipher/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/md.c b/cipher/md.c
index fc740479..be921e4b 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -341,12 +341,16 @@ md_final(MD_HANDLE a)
{
struct md_digest_list_s *r;
+ if( a->finalized )
+ return;
+
if( a->bufcount )
md_write( a, NULL, 0 );
for(r=a->list; r; r = r->next ) {
(*r->final)( &r->context.c );
}
+ a->finalized = 1;
}