diff options
| author | riastradh <riastradh@NetBSD.org> | 2013-06-24 04:21:19 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2013-06-24 04:21:19 +0000 |
| commit | adfdcceb8aad478bc3c5692fb3aff045c0c8ef37 (patch) | |
| tree | ee62fd1d002750ee339715e953885019cf401475 /lib/libcrypt/bcrypt.c | |
| parent | 8fcb059d64019ef3a03b90cb11f6c6d47aeeb6b9 (diff) | |
Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.
consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.
Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
Diffstat (limited to 'lib/libcrypt/bcrypt.c')
| -rw-r--r-- | lib/libcrypt/bcrypt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypt/bcrypt.c b/lib/libcrypt/bcrypt.c index 106b1edb61d..82a8df363bc 100644 --- a/lib/libcrypt/bcrypt.c +++ b/lib/libcrypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $NetBSD: bcrypt.c,v 1.17 2012/08/30 12:16:49 drochner Exp $ */ +/* $NetBSD: bcrypt.c,v 1.18 2013/06/24 04:21:20 riastradh Exp $ */ /* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ /* @@ -46,7 +46,7 @@ * */ #include <sys/cdefs.h> -__RCSID("$NetBSD: bcrypt.c,v 1.17 2012/08/30 12:16:49 drochner Exp $"); +__RCSID("$NetBSD: bcrypt.c,v 1.18 2013/06/24 04:21:20 riastradh Exp $"); #include <stdio.h> #include <stdlib.h> @@ -314,7 +314,7 @@ __bcrypt(const char *key, const char *salt) encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, 4 * BCRYPT_BLOCKS - 1); - __explicit_bzero(&state, sizeof(state)); + __explicit_memset(&state, 0, sizeof(state)); return encrypted; } |
