diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2010-10-06 10:01:00 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2010-10-06 10:01:00 +0000 |
commit | d319eba68e78e50e6b3d98f316f079f33131f8d6 (patch) | |
tree | d001110857dee944922f391a0f8cc2a76ff867e2 /sys/crypto | |
parent | 6117fa0470501811ab75158aa388c5065e2d3ce2 (diff) |
zero out auth hash context before freeing it; ok matthew millert
Diffstat (limited to 'sys/crypto')
-rw-r--r-- | sys/crypto/cryptosoft.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c index 446c91c49de..7006afb968b 100644 --- a/sys/crypto/cryptosoft.c +++ b/sys/crypto/cryptosoft.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptosoft.c,v 1.55 2010/09/22 11:54:23 mikeb Exp $ */ +/* $OpenBSD: cryptosoft.c,v 1.56 2010/10/06 10:00:59 mikeb Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -1037,8 +1037,10 @@ swcr_freesession(u_int64_t tid) case CRYPTO_SHA1: axf = swd->sw_axf; - if (swd->sw_ictx) + if (swd->sw_ictx) { + bzero(swd->sw_ictx, axf->ctxsize); free(swd->sw_ictx, M_CRYPTO_DATA); + } break; } |