summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-09-09 18:08:22 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-09-09 18:08:22 +0000
commit505630b045b1c95f3e4fee3a4d3339777222550c (patch)
treebff085a692772241c2c824b6be72dc324bf41f77
parentf536414389c36f1117e0dc47665c1117e1f5fa92 (diff)
Use "unsigned int" instead of BSD "u_int" in <util.h> so that it can
be included in source files that specify POSIX source. libutil isn't a standard POSIX library, but no need to be gratuitously incompatible. Fixes x11/st. ok tedu, guenther, kettenis
-rw-r--r--lib/libutil/pkcs5_pbkdf2.c8
-rw-r--r--lib/libutil/util.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libutil/pkcs5_pbkdf2.c b/lib/libutil/pkcs5_pbkdf2.c
index 00de38f2a06..17e54c3dc55 100644
--- a/lib/libutil/pkcs5_pbkdf2.c
+++ b/lib/libutil/pkcs5_pbkdf2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs5_pbkdf2.c,v 1.2 2012/09/06 20:49:59 matthew Exp $ */
+/* $OpenBSD: pkcs5_pbkdf2.c,v 1.3 2012/09/09 18:08:21 matthew Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -74,12 +74,12 @@ hmac_sha1(const u_int8_t *text, size_t text_len, const u_int8_t *key,
*/
int
pkcs5_pbkdf2(const char *pass, size_t pass_len, const char *salt, size_t salt_len,
- u_int8_t *key, size_t key_len, u_int rounds)
+ u_int8_t *key, size_t key_len, unsigned int rounds)
{
u_int8_t *asalt, obuf[SHA1_DIGEST_LENGTH];
u_int8_t d1[SHA1_DIGEST_LENGTH], d2[SHA1_DIGEST_LENGTH];
- u_int i, j;
- u_int count;
+ unsigned int i, j;
+ unsigned int count;
size_t r;
if (rounds < 1 || key_len == 0)
diff --git a/lib/libutil/util.h b/lib/libutil/util.h
index 89f2ea783db..6fe0b016e3e 100644
--- a/lib/libutil/util.h
+++ b/lib/libutil/util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.h,v 1.31 2012/09/06 19:41:59 tedu Exp $ */
+/* $OpenBSD: util.h,v 1.32 2012/09/09 18:08:21 matthew Exp $ */
/* $NetBSD: util.h,v 1.2 1996/05/16 07:00:22 thorpej Exp $ */
/*-
@@ -115,7 +115,7 @@ int fmt_scaled(long long, char *);
int scan_scaled(char *, long long *);
int isduid(const char *, int);
int pkcs5_pbkdf2(const char *, size_t, const char *, size_t,
- u_int8_t *, size_t, u_int);
+ u_int8_t *, size_t, unsigned int);
__END_DECLS