diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-03 18:26:35 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-09-03 18:26:35 +0000 |
commit | 7bc483497b265ed060423c342644d3e6c7af6d7e (patch) | |
tree | e2af0a9231d9215014239d25059f06420400b101 /sys/crypto | |
parent | b5d83712d16e9bc37d33a719f6bb312aa23955bd (diff) |
zap context correctly, from Juergen Buchmueller <pullmoll at stop1984 dot com>
deraadt@ ok.
Diffstat (limited to 'sys/crypto')
-rw-r--r-- | sys/crypto/sha2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/crypto/sha2.c b/sys/crypto/sha2.c index e25f8818193..af77358c550 100644 --- a/sys/crypto/sha2.c +++ b/sys/crypto/sha2.c @@ -606,7 +606,7 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { } /* Clean up state data: */ - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); usedspace = 0; } @@ -627,7 +627,7 @@ char *SHA256_End(SHA256_CTX* context, char buffer[]) { } *buffer = (char)0; } else { - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); } bzero(digest, SHA256_DIGEST_LENGTH); return buffer; @@ -936,7 +936,7 @@ void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) { } /* Zero out state data */ - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); } char *SHA512_End(SHA512_CTX* context, char buffer[]) { @@ -956,7 +956,7 @@ char *SHA512_End(SHA512_CTX* context, char buffer[]) { } *buffer = (char)0; } else { - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); } bzero(digest, SHA512_DIGEST_LENGTH); return buffer; @@ -1011,7 +1011,7 @@ void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) { } /* Zero out state data */ - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); } char *SHA384_End(SHA384_CTX* context, char buffer[]) { @@ -1031,7 +1031,7 @@ char *SHA384_End(SHA384_CTX* context, char buffer[]) { } *buffer = (char)0; } else { - bzero(context, sizeof(context)); + bzero(context, sizeof(*context)); } bzero(digest, SHA384_DIGEST_LENGTH); return buffer; |