aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorFlorent Daigniere <nextgens@freenetproject.org>2014-06-27 09:59:45 (GMT)
committerJouni Malinen <j@w1.fi>2014-07-24 16:35:07 (GMT)
commit26c10f797cced4eab68590accc96508d70325ff7 (patch)
tree2abd6ca6a341a3a12a831b2fdd1a3bb936f565f4 /src/eap_common
parent3248071dc3165719a087b401f12fef732b0c4e64 (diff)
downloadhostap-26c10f797cced4eab68590accc96508d70325ff7.zip
hostap-26c10f797cced4eab68590accc96508d70325ff7.tar.gz
hostap-26c10f797cced4eab68590accc96508d70325ff7.tar.bz2
OpenSSL: Use EC_POINT_clear_free instead of EC_POINT_free
This changes OpenSSL calls to explicitly clear the EC_POINT memory allocations when freeing them. This adds an extra layer of security by avoiding leaving potentially private keys into local memory after they are not needed anymore. While some of these variables are not really private (e.g., they are sent in clear anyway), the extra cost of clearing them is not significant and it is simpler to just clear these explicitly rather than review each possible code path to confirm where this does not help. Signed-off-by: Florent Daigniere <nextgens@freenetproject.org>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/eap_pwd_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_common/eap_pwd_common.c b/src/eap_common/eap_pwd_common.c
index a1a24e3..fdcff7f 100644
--- a/src/eap_common/eap_pwd_common.c
+++ b/src/eap_common/eap_pwd_common.c
@@ -263,7 +263,7 @@ int compute_password_element(EAP_PWD_group *grp, u16 num,
fail:
EC_GROUP_free(grp->group);
grp->group = NULL;
- EC_POINT_free(grp->pwe);
+ EC_POINT_clear_free(grp->pwe);
grp->pwe = NULL;
BN_clear_free(grp->order);
grp->order = NULL;