diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-18 03:53:37 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-18 03:53:37 +0100 |
commit | 7476dc0e9ae620afa4a5a5fba90997a0af18fadc (patch) | |
tree | 0a9c476249a4b9918a993606e844c72a467c2b43 /src/crypto/mac/ghash | |
parent | 3e8e646b91b7256ab46eb767951d2028f0dda0eb (diff) | |
download | fastd-7476dc0e9ae620afa4a5a5fba90997a0af18fadc.tar fastd-7476dc0e9ae620afa4a5a5fba90997a0af18fadc.zip |
secure_memzero all cipher and MAC states
Diffstat (limited to 'src/crypto/mac/ghash')
-rw-r--r-- | src/crypto/mac/ghash/builtin/ghash_builtin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/mac/ghash/builtin/ghash_builtin.c b/src/crypto/mac/ghash/builtin/ghash_builtin.c index 34e118a..a243b2a 100644 --- a/src/crypto/mac/ghash/builtin/ghash_builtin.c +++ b/src/crypto/mac/ghash/builtin/ghash_builtin.c @@ -126,7 +126,10 @@ static bool ghash_hash(fastd_context_t *ctx UNUSED, const fastd_mac_state_t *sta } static void ghash_free_state(fastd_context_t *ctx UNUSED, fastd_mac_state_t *state) { - free(state); + if (state) { + secure_memzero(state, sizeof(*state)); + free(state); + } } static void ghash_free(fastd_context_t *ctx UNUSED, fastd_mac_context_t *mctx UNUSED) { |