diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-29 11:31:51 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-29 11:31:51 +0000 |
commit | c9ea7400b49f51dd2b4657be0264c437dfd29bf3 (patch) | |
tree | 540a9f03a13bf3ea20a8a7f9becbfbb8878ebfc4 /crypto/md2 | |
parent | 9fa15b6ff88dc33a705fed7fc044639143dd394e (diff) |
A few more memset()s converted to OPENSSL_cleanse().
I *think* I got them all covered by now, bu please, if you find any more,
tell me and I'll correct it.
PR: 343
Diffstat (limited to 'crypto/md2')
-rw-r--r-- | crypto/md2/md2_dgst.c | 2 | ||||
-rw-r--r-- | crypto/md2/md2_one.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/md2/md2_dgst.c b/crypto/md2/md2_dgst.c index f98009acad..47866c3c86 100644 --- a/crypto/md2/md2_dgst.c +++ b/crypto/md2/md2_dgst.c @@ -196,7 +196,7 @@ static void md2_block(MD2_CTX *c, const unsigned char *d) t=(t+i)&0xff; } memcpy(sp1,state,16*sizeof(MD2_INT)); - memset(state,0,48*sizeof(MD2_INT)); + OPENSSL_cleanse(state,48*sizeof(MD2_INT)); } int MD2_Final(unsigned char *md, MD2_CTX *c) diff --git a/crypto/md2/md2_one.c b/crypto/md2/md2_one.c index b12c37ce4d..835160ef56 100644 --- a/crypto/md2/md2_one.c +++ b/crypto/md2/md2_one.c @@ -88,6 +88,6 @@ unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md) } #endif MD2_Final(md,&c); - memset(&c,0,sizeof(c)); /* Security consideration */ + OPENSSL_cleanse(&c,sizeof(c)); /* Security consideration */ return(md); } |