summaryrefslogtreecommitdiffstats
path: root/crypto/engine
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-28 08:09:03 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-28 08:09:03 +0000
commit75e3026a14339f3818fe57281979b7ee85399d43 (patch)
treeec56a26b6c553d120df76142a2b6241ac322b4c9 /crypto/engine
parent0a3af9a4038045ba59bcf10a4f9e0b6bb5107cd8 (diff)
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/engine')
-rw-r--r--crypto/engine/hw_4758_cca.c4
-rw-r--r--crypto/engine/hw_sureware.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/engine/hw_4758_cca.c b/crypto/engine/hw_4758_cca.c
index 55a9883ef5..4f5ae8a46d 100644
--- a/crypto/engine/hw_4758_cca.c
+++ b/crypto/engine/hw_4758_cca.c
@@ -717,7 +717,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
if (type == NID_sha1 || type == NID_md5)
{
- memset(hashBuffer, 0, keyLength+1);
+ OPENSSL_cleanse(hashBuffer, keyLength+1);
OPENSSL_free(hashBuffer);
}
@@ -840,7 +840,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
if (type == NID_sha1 || type == NID_md5)
{
- memset(hashBuffer, 0, keyLength+1);
+ OPENSSL_cleanse(hashBuffer, keyLength+1);
OPENSSL_free(hashBuffer);
}
diff --git a/crypto/engine/hw_sureware.c b/crypto/engine/hw_sureware.c
index 8ace126c14..fca467e690 100644
--- a/crypto/engine/hw_sureware.c
+++ b/crypto/engine/hw_sureware.c
@@ -907,7 +907,7 @@ static int surewarehk_rsa_priv_dec(int flen,const unsigned char *from,unsigned c
err:
if (buf)
{
- memset(buf,0,tlen);
+ OPENSSL_cleanse(buf,tlen);
OPENSSL_free(buf);
}
return ret;