From 4579924b7e55fccc7013e6de196f2e2ab175ce39 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 28 Nov 2002 08:04:36 +0000 Subject: Cleanse memory using the new OPENSSL_cleanse() function. I've covered all the memset()s I felt safe modifying, but may have missed some. --- crypto/ec/ec_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/ec/ec_lib.c') diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 9669f42..2cc0dc0 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -162,11 +162,11 @@ void EC_GROUP_clear_free(EC_GROUP *group) if (group->seed) { - memset(group->seed, 0, group->seed_len); + OPENSSL_cleanse(group->seed, group->seed_len); OPENSSL_free(group->seed); } - memset(group, 0, sizeof *group); + OPENSSL_cleanse(group, sizeof *group); OPENSSL_free(group); } @@ -591,7 +591,7 @@ void EC_POINT_clear_free(EC_POINT *point) point->meth->point_clear_finish(point); else if (point->meth != NULL && point->meth->point_finish != 0) point->meth->point_finish(point); - memset(point, 0, sizeof *point); + OPENSSL_cleanse(point, sizeof *point); OPENSSL_free(point); } -- cgit v1.1