summaryrefslogtreecommitdiff
path: root/mkpasswd.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2014-12-14 23:46:13 +0100
committerMarco d'Itri <md@linux.it>2014-12-26 19:55:51 +0100
commitb207df0805d431d379bba52cff499cbbca288c64 (patch)
tree756d700ae3f72b016ad3fcb7dbcf0ddc4394c1d0 /mkpasswd.c
parent219a1686eee2b5bb9459faac74c914ca1889c71c (diff)
downloadwhois-b207df0805d431d379bba52cff499cbbca288c64.tar.gz
mkpasswd: support OpenBSD's new hash 2b
Diffstat (limited to 'mkpasswd.c')
-rw-r--r--mkpasswd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mkpasswd.c b/mkpasswd.c
index 2e3ca80..63c82f1 100644
--- a/mkpasswd.c
+++ b/mkpasswd.c
@@ -86,7 +86,13 @@ static const struct crypt_method methods[] = {
N_("standard 56 bit DES-based crypt(3)") },
{ "md5", "$1$", 8, 8, 0, "MD5" },
#if defined OpenBSD || defined FreeBSD || (defined __SVR4 && defined __sun)
+# if (defined OpenBSD && OpenBSD >= 201405)
+ /* http://marc.info/?l=openbsd-misc&m=139320023202696 */
+ { "bf", "$2b$", 22, 22, 1, "Blowfish" },
+ { "bfa", "$2a$", 22, 22, 1, "Blowfish (obsolete $2a$ version)" },
+# else
{ "bf", "$2a$", 22, 22, 1, "Blowfish" },
+# endif
#endif
#if defined HAVE_LINUX_CRYPT_GENSALT
{ "bf", "$2a$", 22, 22, 1, "Blowfish, system-specific on 8-bit chars" },