aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-07-25 10:15:58 +0200
committerTobias Brunner <tobias@strongswan.org>2017-08-07 16:55:28 +0200
commite0c78d751664418b1cba6113350f9ea1e7c6a29a (patch)
treeac5adfc1032ca878c43fc43e211c40439e813d32 /src
parent32e5c49234ce4af2ef375e3f1750fdb90f813905 (diff)
downloadstrongswan-e0c78d751664418b1cba6113350f9ea1e7c6a29a.tar.bz2
strongswan-e0c78d751664418b1cba6113350f9ea1e7c6a29a.tar.xz
prf-plus: Wipe seed and internal buffer
The buffer contains key material we handed out last and the seed can contain the DH secret. References #2388.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/crypto/prf_plus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/crypto/prf_plus.c b/src/libstrongswan/crypto/prf_plus.c
index 6b7f8f851..a26010aae 100644
--- a/src/libstrongswan/crypto/prf_plus.c
+++ b/src/libstrongswan/crypto/prf_plus.c
@@ -115,8 +115,8 @@ METHOD(prf_plus_t, allocate_bytes, bool,
METHOD(prf_plus_t, destroy, void,
private_prf_plus_t *this)
{
- free(this->buffer.ptr);
- free(this->seed.ptr);
+ chunk_clear(&this->buffer);
+ chunk_clear(&this->seed);
free(this);
}