summaryrefslogtreecommitdiffstats
path: root/lib/libutil/bcrypt_pbkdf.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2013-06-04 15:54:32 +0000
committertedu <tedu@openbsd.org>2013-06-04 15:54:32 +0000
commit04e48af3504d9c592146f1823e4bbb946c25a493 (patch)
tree37b93649a81fae952ebb03b61543a7f0194a508f /lib/libutil/bcrypt_pbkdf.c
parentCpu topology for AMD64. (diff)
downloadwireguard-openbsd-04e48af3504d9c592146f1823e4bbb946c25a493.tar.xz
wireguard-openbsd-04e48af3504d9c592146f1823e4bbb946c25a493.zip
oops, rounds is unsigned now
Diffstat (limited to '')
-rw-r--r--lib/libutil/bcrypt_pbkdf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libutil/bcrypt_pbkdf.c b/lib/libutil/bcrypt_pbkdf.c
index 732499be0c9..24b628cc3f4 100644
--- a/lib/libutil/bcrypt_pbkdf.c
+++ b/lib/libutil/bcrypt_pbkdf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcrypt_pbkdf.c,v 1.1 2013/06/03 21:07:02 tedu Exp $ */
+/* $OpenBSD: bcrypt_pbkdf.c,v 1.2 2013/06/04 15:54:32 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -107,8 +107,6 @@ bcrypt_pbkdf(const char *pass, size_t passlen, const uint8_t *salt, size_t saltl
uint32_t count;
/* nothing crazy */
- if (rounds < 1)
- return -1;
if (passlen == 0 || saltlen == 0 || keylen == 0 ||
keylen > sizeof(out) * sizeof(out))
return -1;