diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-28 08:04:36 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-28 08:04:36 +0000 |
commit | 4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch) | |
tree | fa19611a704cc901d3ba338cefbbb98878de7ee5 /engines | |
parent | 2047bda6fb8bedab1103b7bd5df5ea55eb7ccc9b (diff) | |
download | openssl-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 'engines')
-rw-r--r-- | engines/e_4758_cca.c | 4 | ||||
-rw-r--r-- | engines/e_sureware.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/e_4758_cca.c b/engines/e_4758_cca.c index 84de02df92..091e2dd317 100644 --- a/engines/e_4758_cca.c +++ b/engines/e_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/engines/e_sureware.c b/engines/e_sureware.c index 9c2279c195..270ee0934e 100644 --- a/engines/e_sureware.c +++ b/engines/e_sureware.c @@ -906,7 +906,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; |