3
. ../../../prepare.inc.sh
4
. ../../../toolbox.inc.sh
7
# ---- do the actual testing ----
10
echo "++++ BEGINNING TEST" >$OUTPUTFILE
12
# check that an empty key type fails correctly
13
marker "CHECK EMPTY KEY TYPE"
14
search_for_key --fail @s "" wibble
16
search_for_key --fail @s "" wibble @p
19
# check that an unsupported key type fails correctly
20
marker "CHECK UNSUPPORTED KEY TYPE"
21
search_for_key --fail @s lizardsgizzards wibble
23
search_for_key --fail @s lizardsgizzards wibble @p
26
# check that an invalid key type fails correctly
27
marker "CHECK INVALID KEY TYPE"
28
search_for_key --fail @s .user wibble
30
search_for_key --fail @s .user wibble @p
33
# check that an overlong key type fails correctly
34
marker "CHECK OVERLONG KEY TYPE"
35
search_for_key --fail @s $maxtype wibble
37
search_for_key --fail @s a$maxtype wibble @p
40
# check that an max length key description works correctly (4095 inc NUL)
41
marker "CHECK MAXLEN DESC"
42
search_for_key --fail @s user $maxdesc
45
search_for_key --fail @s user $maxdesc @p
48
# check that an overlong key description fails correctly (>4095 inc NUL)
49
marker "CHECK OVERLONG DESC"
50
search_for_key --fail @s user a$maxdesc
53
search_for_key --fail @s user a$maxdesc @p
56
# check that a bad key ID fails correctly
57
marker "CHECK BAD KEY ID"
58
search_for_key --fail @s user wibble -2000
61
# create a non-keyring key
63
create_key user a a @s
66
# search the non-keyring key
68
search_for_key --fail $keyid user a
70
search_for_key --fail $keyid user a @p
77
echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE
79
# --- then report the results in the database ---
80
toolbox_report_result $TEST $result