aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/md.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-02-27 17:51:28 +0000
committerWerner Koch <[email protected]>1998-02-27 17:51:28 +0000
commitb13e238a195893b55e09f2c5d73c70b27a040a50 (patch)
tree78f97a94022956ff0b12cb9e1bfcf407077688f7 /cipher/md.c
parentrelease 0.2.9 (diff)
downloadgnupg-b13e238a195893b55e09f2c5d73c70b27a040a50.tar.gz
gnupg-b13e238a195893b55e09f2c5d73c70b27a040a50.zip
bug fixesV0-2-10
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cipher/md.c b/cipher/md.c
index dd40136a7..a9a566698 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -49,15 +49,18 @@ void
md_enable( MD_HANDLE h, int algo )
{
if( algo == DIGEST_ALGO_MD5 ) {
- md5_init( &h->md5 );
+ if( !h->use_md5 )
+ md5_init( &h->md5 );
h->use_md5 = 1;
}
else if( algo == DIGEST_ALGO_RMD160 ) {
- rmd160_init( &h->rmd160 );
+ if( !h->use_rmd160 )
+ rmd160_init( &h->rmd160 );
h->use_rmd160 = 1;
}
else if( algo == DIGEST_ALGO_SHA1 ) {
- sha1_init( &h->sha1 );
+ if( !h->use_sha1 )
+ sha1_init( &h->sha1 );
h->use_sha1 = 1;
}
else