# Test suite for basic Heimdal external strength checking functionality.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2009 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2009, 2012
+# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
fi
# Okay, we should be good to run the test suite.
-plan 42
+plan 48
# We don't have a password_dictionary setting, so we should fail with an
# initialization error.
EOF
# Check the basic functionality.
-ok_password "good password" 'test@EXAMPLE.ORG' 'known good password' 0 \
+ok_password 'good password' 'test@EXAMPLE.ORG' 'known good password' 0 \
'APPROVED' ''
-ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'password' 0 '' \
+ok_password 'password in dictionary' 'test@EXAMPLE.ORG' 'password' 0 '' \
'it is based on a dictionary word'
-ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'bitter' 0 '' \
+ok_password 'password in dictionary' 'test@EXAMPLE.ORG' 'bitterbane' 0 '' \
'it is based on a dictionary word'
-ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'rettib' 0 '' \
+ok_password 'password in dictionary' 'test@EXAMPLE.ORG' 'enabrettib' 0 '' \
'it is based on a (reversed) dictionary word'
-ok_password "password too short" 'test@EXAMPLE.ORG' 'food' 0 '' \
- "it is too short"
-ok_password "password way too short" 'test@EXAMPLE.ORG' 'foo' 0 '' \
+ok_password 'password seven characters' 'test@EXAMPLE.ORG' 'dfareas' 0 '' \
+ 'it is too short'
+ok_password 'password too short' 'test@EXAMPLE.ORG' 'food' 0 '' \
+ 'it is too short'
+ok_password 'password way too short' 'test@EXAMPLE.ORG' 'foo' 0 '' \
"it's WAY too short"
-ok_password "password empty" 'test@EXAMPLE.ORG' '' 0 '' \
+ok_password 'password empty' 'test@EXAMPLE.ORG' '' 0 '' \
"it's WAY too short"
-ok_password "password all whitespace" 'test@EXAMPLE.ORG' ' ' 0 '' \
+ok_password 'password all whitespace' 'test@EXAMPLE.ORG' ' ' 0 '' \
'it does not contain enough DIFFERENT characters'
-ok_password "password too simplistic" 'test@EXAMPLE.ORG' 'abcdefghi' 0 '' \
+ok_password 'password too simplistic' 'test@EXAMPLE.ORG' 'abcdefghi' 0 '' \
'it is too simplistic/systematic'
-ok_password "not enough characters" 'test@EXAMPLE.ORG' '22413411' 0 '' \
+ok_password 'not enough characters' 'test@EXAMPLE.ORG' '22413411' 0 '' \
'it does not contain enough DIFFERENT characters'
-ok_password "password based on principal" 'someuser@EXAMPLE.ORG' 'someuser' \
+ok_password 'password based on principal' 'someuser@EXAMPLE.ORG' 'someuser' \
0 '' 'Password based on username'
-ok_password "password based on principal" 'someuser@EXAMPLE.ORG' 'resuemos' \
+ok_password 'password based on principal' 'someuser@EXAMPLE.ORG' 'resuemos' \
0 '' 'Password based on username'
-ok_password "password is principal" 'test@EXAMPLE.ORG' 'test@EXAMPLE.ORG' \
+ok_password 'password is username with digits' 'someuser@EXAMPLE.ORG' \
+ 'someuser123' 0 '' 'Password based on username'
+ok_password 'password is principal' 'test@EXAMPLE.ORG' 'test@EXAMPLE.ORG' \
0 '' 'Password based on username'
# Clean up.
ok_password "good password" 'test@EXAMPLE.ORG' 'known good password' 0 ''
ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'password' 1 \
'it is based on a dictionary word'
-ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'bitter' 1 \
+ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'bitterbane' 1 \
'it is based on a dictionary word'
-ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'rettib' 1 \
+ok_password "password in dictionary" 'test@EXAMPLE.ORG' 'enabrettib' 1 \
'it is based on a (reversed) dictionary word'
ok_password "password too short" 'test@EXAMPLE.ORG' 'food' 1 \
"it is too short"
"it's WAY too short"
ok_password "password empty" 'test@EXAMPLE.ORG' '' 1 \
"it's WAY too short"
-ok_password "password all whitespace" 'test@EXAMPLE.ORG' ' ' 1 \
+ok_password "password all whitespace" 'test@EXAMPLE.ORG' ' ' 1 \
'it does not contain enough DIFFERENT characters'
ok_password "password too simplistic" 'test@EXAMPLE.ORG' 'abcdefghi' 1 \
'it is too simplistic/systematic'