Debian Codegraph @

testcases/misc_tests/README

raw
1 Miscellaneous tests
2
3 obj_mgmt_tests
4 This testsuite performs various object management tasks.
5
6 The do_CreateTokenObjects() and do_HWFeatureSearch() functions
7 create token objects and by default or skipped.
8 To include these two functions, use the "-noskip" option when issuing
9 the tests.
10
11 spinlock_tests.sh
12 Tests the two spinlocks: /var/lock/LCK..opencryptoki which is used
13 when accessing shared memory for pkcsslotd and pkcs#11 api calls.
14 And /var/lock/LOCK..opencryptoki_stdll which is used when accessing
15 global shared memory in the STDLLs.
16
17 The file, spinlock_tests.sh is a bash script that creates a
18 number of child processes. Each child process runs spinlock_child.sh
19 script.
20
21 Quick Start Info:
22
23 Execute testcase by,
24 spinlock_tests.sh -p <num> -l <num> -s <slotid>
25 p: the amount of child processes to create
26 l: the number of times each child process executes
27 obj_mgmt_lock_tests
28 s: the slot to test
29
30 For example,
31 spinlock_tests.sh -p 15 -l 5 -s 1
32
33 Additional Info:
34
35 obj_mgmt_lock_tests
36 spinlock_child.sh
37
38 The file, spinlock_tests.sh is a bash script that creates a
39 number of child processes. Each child process runs spinlock_child.sh
40 script.
41
42 The file, spinlock_child.sh is a bash script that executes
43 obj_mgmt_lock_tests a number of times.
44
45 obj_mgmt_lock_tests was derived from obj_mgmt.c.
46 It contains several api calls that will want to acquire the various
47 spinlocks.
48
49 Usage: spinlock_child.sh -l <count> -s <slotid>
50 l: the number of times each child process executes obj_mgmt_lock_tests
51 s: the slot to test
52
53 Usage: obj_mgmt_lock_tests -slot <slotid>
54
55 threadmkobj
56 TODO: To be tested.
57
58 speed
59 TODO: To be tested.
60 The speed program is a performance oriented test program. It times
61 certain operations over multiple runs, and gives min, max, and average
62 times for these operations. Performace tests are run for: 2048 bit
63 RSA keygen, 10½4 bit RSA keygen, 1024 bit RSA signature generate,
64 1024 bit RSA signature verify, triple DES encrypt/decrypt on a
65 10K message, and SHA1 on a 10K message.
66
67 tok_obj
68 TODO: To be tested.
69 This program is used to test object creation and modification.
70 The token does not need to be intitialized to use this application.
71 When run, a user is presented with a menu. From there, the user
72 must initialize the token and set the user PIN if this has not been
73 done previously. The menu choice for setting the user PIN sets it
74 to "12345678".
75
76 tok_des
77 TODO: To be tested.
78
79 tok_rsa
80 TODO: To be tested.
81
82 fork
83 This testcase forks off a client process in various situations, e.g
84 before and after initialization, before and after session creation,
85 and ensures that the forked client process finds an uninitialized
86 Opencryptoki environment and does not have access to any of the
87 parent's sessions or objects. Also the parents sessions and objects
88 must still be available and functional in the parent process after the
89 fork.
90
91 As per PKCS#11 standard, a forked child process is no PKCS#11
92 application after the fork, and must initialize Opencryptoki using
93 C_Initialize() in order to use Opencryptoki.
94
95 Usage: fork -slot <slotid>
96
97 multi_instance
98 This testcase open sessions on two different tokens within one process.
99 It ensures that both tokens operate independently, and that sessions of
100 objects opened with one token can not be used with the other one.
101
102 To test multi-instance support of a token, the Opencryptoi configuration
103 must be set up that way that 2 tokens of the same type (e.g. 2 EP11
104 tokens) exist.
105
106 Usage: multi_instance -slot1 <slotid1> -slot2 <slotid2>
107
108 tok2tok_transport
109 This testcase open sessions on two different tokens within one process.
110 It then generates a keys in the first token, and transports them via
111 various Wrap/Unwrap mechanisms to the other token. It is checked that
112 the transported key can still be used in the receiving token.
113
114 Usage: tok2tok_transport -slot1 <slotid1> -slot2 <slotid2>