From adfdcceb8aad478bc3c5692fb3aff045c0c8ef37 Mon Sep 17 00:00:00 2001 From: riastradh Date: Mon, 24 Jun 2013 04:21:19 +0000 Subject: 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. --- lib/libcrypt/bcrypt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libcrypt/bcrypt.c') 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 -__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 #include @@ -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; } -- cgit