diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-06-08 09:01:14 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-06-14 14:22:39 +1000 |
commit | 10974f986fa842a3a3a693e3d5761072540002b4 (patch) | |
tree | 3342acf1735c8b2a68c3384eacfa180c944d3c27 /openbsd-compat | |
parent | cb8f56570f70b00abae4267d4bcce2bfae7dfff6 (diff) |
upstream: Use explicit_bzero instead of memset
in hash Final and End functions. OK deraadt@ djm@
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/sha1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/sha1.c b/openbsd-compat/sha1.c index 4b5381f87..c616778e2 100644 --- a/openbsd-compat/sha1.c +++ b/openbsd-compat/sha1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sha1.c,v 1.23 2014/01/08 06:14:57 tedu Exp $ */ | 1 | /* $OpenBSD: sha1.c,v 1.24 2015/01/15 13:05:59 millert Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * SHA-1 in C | 4 | * SHA-1 in C |
@@ -172,6 +172,6 @@ SHA1Final(u_int8_t digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context) | |||
172 | digest[i] = (u_int8_t) | 172 | digest[i] = (u_int8_t) |
173 | ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); | 173 | ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255); |
174 | } | 174 | } |
175 | memset(context, 0, sizeof(*context)); | 175 | explicit_bzero(context, sizeof(*context)); |
176 | } | 176 | } |
177 | #endif /* !WITH_OPENSSL */ | 177 | #endif /* !WITH_OPENSSL */ |