aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rc4
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-28 08:04:36 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-28 08:04:36 +0000
commit4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch)
treefa19611a704cc901d3ba338cefbbb98878de7ee5 /crypto/rc4
parent2047bda6fb8bedab1103b7bd5df5ea55eb7ccc9b (diff)
downloadopenssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.tar.gz
Cleanse memory using the new OPENSSL_cleanse() function.
I've covered all the memset()s I felt safe modifying, but may have missed some.
Diffstat (limited to 'crypto/rc4')
-rw-r--r--crypto/rc4/rc4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rc4/rc4.c b/crypto/rc4/rc4.c
index c2165b0b75..b39c070292 100644
--- a/crypto/rc4/rc4.c
+++ b/crypto/rc4/rc4.c
@@ -155,7 +155,7 @@ bad:
i=EVP_read_pw_string(buf,BUFSIZ,"Enter RC4 password:",0);
if (i != 0)
{
- memset(buf,0,BUFSIZ);
+ OPENSSL_cleanse(buf,BUFSIZ);
fprintf(stderr,"bad password read\n");
exit(1);
}
@@ -163,7 +163,7 @@ bad:
}
EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5());
- memset(keystr,0,strlen(keystr));
+ OPENSSL_cleanse(keystr,strlen(keystr));
RC4_set_key(&key,MD5_DIGEST_LENGTH,md);
for(;;)