forked from pool/whois
29 lines
847 B
Diff
29 lines
847 B
Diff
|
From 45731d21f551b72e10e211edfa1b3c4e2ed3f8ad Mon Sep 17 00:00:00 2001
|
||
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||
|
Date: Thu, 14 Jul 2011 13:39:07 +0200
|
||
|
Subject: [PATCH whois 5/7] set default blowfish rounds to 5
|
||
|
|
||
|
five rounds is the crypt_blowfish default
|
||
|
---
|
||
|
mkpasswd.c | 4 ++--
|
||
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/mkpasswd.c b/mkpasswd.c
|
||
|
index 281d970..ee997ba 100644
|
||
|
--- a/mkpasswd.c
|
||
|
+++ b/mkpasswd.c
|
||
|
@@ -232,8 +232,8 @@ int main(int argc, char *argv[])
|
||
|
|
||
|
if (streq(salt_prefix, "$2a$")
|
||
|
|| streq(salt_prefix, "$2y$")) { /* OpenBSD Blowfish */
|
||
|
- if (rounds <= 4)
|
||
|
- rounds = 4;
|
||
|
+ if (rounds < 5)
|
||
|
+ rounds = 5;
|
||
|
/* actually for 2a it is the logarithm of the number of rounds */
|
||
|
snprintf(rounds_str, sizeof(rounds_str), "%02u$", rounds);
|
||
|
} else if (rounds_support && rounds)
|
||
|
--
|
||
|
1.7.3.4
|
||
|
|