summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index 0cf485de60..deb522060f 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -128,7 +128,7 @@ void EC_GROUP_clear_free(EC_GROUP *group)
128 128
129 EC_GROUP_clear_free_extra_data(group); 129 EC_GROUP_clear_free_extra_data(group);
130 130
131 memset(group, 0, sizeof *group); 131 OPENSSL_cleanse(group, sizeof *group);
132 OPENSSL_free(group); 132 OPENSSL_free(group);
133 } 133 }
134 134
@@ -268,7 +268,9 @@ void *EC_GROUP_get_extra_data(const EC_GROUP *group, void *(*extra_data_dup_func
268 || (group->extra_data_free_func != extra_data_free_func) 268 || (group->extra_data_free_func != extra_data_free_func)
269 || (group->extra_data_clear_free_func != extra_data_clear_free_func)) 269 || (group->extra_data_clear_free_func != extra_data_clear_free_func))
270 { 270 {
271 ECerr(EC_F_EC_GROUP_GET_EXTRA_DATA, EC_R_NO_SUCH_EXTRA_DATA); 271#if 0 /* this was an error in 0.9.7, but that does not make a lot of sense */
272 ECerr(..._F_EC_GROUP_GET_EXTRA_DATA, ..._R_NO_SUCH_EXTRA_DATA);
273#endif
272 return NULL; 274 return NULL;
273 } 275 }
274 276
@@ -357,7 +359,7 @@ void EC_POINT_clear_free(EC_POINT *point)
357 point->meth->point_clear_finish(point); 359 point->meth->point_clear_finish(point);
358 else if (point->meth != NULL && point->meth->point_finish != 0) 360 else if (point->meth != NULL && point->meth->point_finish != 0)
359 point->meth->point_finish(point); 361 point->meth->point_finish(point);
360 memset(point, 0, sizeof *point); 362 OPENSSL_cleanse(point, sizeof *point);
361 OPENSSL_free(point); 363 OPENSSL_free(point);
362 } 364 }
363 365