diff options
Diffstat (limited to 'cipher/md.c')
-rw-r--r-- | cipher/md.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/md.c b/cipher/md.c index fc740479e..be921e4b0 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; } |