mkpasswd: support OpenBSD's new hash 2b

This commit is contained in:
Marco d'Itri 2014-12-14 23:46:13 +01:00
parent 219a1686ee
commit b207df0805

View File

@ -86,7 +86,13 @@ static const struct crypt_method methods[] = {
N_("standard 56 bit DES-based crypt(3)") }, N_("standard 56 bit DES-based crypt(3)") },
{ "md5", "$1$", 8, 8, 0, "MD5" }, { "md5", "$1$", 8, 8, 0, "MD5" },
#if defined OpenBSD || defined FreeBSD || (defined __SVR4 && defined __sun) #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" }, { "bf", "$2a$", 22, 22, 1, "Blowfish" },
# endif
#endif #endif
#if defined HAVE_LINUX_CRYPT_GENSALT #if defined HAVE_LINUX_CRYPT_GENSALT
{ "bf", "$2a$", 22, 22, 1, "Blowfish, system-specific on 8-bit chars" }, { "bf", "$2a$", 22, 22, 1, "Blowfish, system-specific on 8-bit chars" },