1
0
mirror of https://github.com/opencryptoki/opencryptoki.git synced 2026-10-24 05:39:17 +03:00
Commit Graph

67 Commits

Author SHA1 Message Date
Kent Yoder
5156ba9940 session perf testcase returning buffer too small
Hi Klaus,

  While running sess_perf.c, I routinely got CKR_BUFFER_TOO_SMALL as the test
called encrypt_DATA during its run.

  I believe this patch fixes the issue, which is that an uninitialized outlen
parameter was being passed into C_EncryptUpdate and C_EncryptFile.  I also
added a return code value from main in this patch.

  Please consider for inclusion in opencryptoki-next.

Thanks,
Kent

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
2010-07-27 18:26:35 -03:00
Klaus Heinrich Kiwi
11c859e94f Use pointer as object handler
This avoids interating through a list of objects attached to
some particular process every time the object is needed.

As previous commits did with session object, this commit applies to
object handles. This MAY cause segfaults if the caller application
passes invalid handles, but this is often caused by buggy applications.

Also remote tests with invalid object handlers from obj_mgmt.c

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-07-05 09:34:44 -03:00
Klaus Heinrich Kiwi
afcea384cf Use pointer as session handler in API layer
To avoid iterating through the API Session list Anchor->SessListBeg
every time we need a session reference, use the session's own
pointer as handle.

This change MAY introduce segfaults if the caller application
passes invalid session handlers that cannot be directly dereferenced,
but that usually only means that the application is buggy and needs
fixing.

Also removes tests with invalid session handlers from obj_mgmt.c

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-07-05 09:34:16 -03:00
Klaus Heinrich Kiwi
24caf4325a New "sess_perf.c" testcase
New testcase (derived from sess_obj.c) aimed at benchmarking
opencryptoki's performance under a high number of open sessions.
This test should be relatively long running (about 1 hour
each run). It measures the time it takes to perform two
encryption operations for various counts of currently open
sessions.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-07-05 09:33:03 -03:00
Klaus Heinrich Kiwi
3941dca37c Use a ock_tests.sh.in to use the correct paths at build time
This patch removes moves ock_tests.sh to ock_tests.sh.in in
order to have it processed at build time. Time allow us to
use the pathnames used by the overall build process.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-01-12 15:37:12 -02:00
Klaus Heinrich Kiwi
a537933920 Minor fixes/enhancements to the ock_tests.sh script
ock_tests.sh is currently with always-on logging (due to a typo in
"if [ "$LOGGING"="1" ]".
Fix that behavior and also make every output either go to the log or to
the stdout (by enclosing the script with a function that can have it's
output redirected)

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2009-07-28 09:20:10 -03:00
phreakz
7104e9195e Now able to log tests errors
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
2009-02-04 16:28:41 +00:00
phreakz
4403e0af1c skip_token_obj now declared inside testcases/include/regress.h 2008-11-20 16:41:14 +00:00
phreakz
16fed7eedf Removed redunant handling of PKCSLIB environment variable. 2008-11-20 16:40:37 +00:00
phreakz
535fb62597 skip_token_obj now declared inside testcases/include/regress.h 2008-11-19 13:23:43 +00:00
phreakz
d0de9a0d29 Testcases improvements:
- Now testcases inside testcases/driver can be run separatedly
- ock-tests.sh now calls individual tests instead of testcases/driver/driver binary
- since all usage() were the same inside testcases/driver, this is now located at testcases/common.c. To avoid namespace conflict, the other usage() ones were renamed to <testcase_binary_name>_usage()
- skip_token_obj, no_stop and no_init are now declared in testcases/include/regress,h
2008-11-11 13:17:22 +00:00
phreakz
95b4a90893 Update on driver directory, new instructions regarding deprecated testcases and ock_tests.sh 2008-08-04 14:05:52 +00:00
phreakz
859de039be Replaced spaces for tabs and included the option to do not stop the test in case one fails 2008-07-30 19:22:49 +00:00
phreakz
ee1360d3f8 Replaced spaces for tabs, included the option to do not stop the test in case one fails, included do_LoginLogout test 2008-07-30 19:22:12 +00:00
phreakz
88337660be Replaced spaces for tabs, included the option to do not stop the test in case one fails, included do_HWFeatureSearch test 2008-07-30 19:21:07 +00:00
phreakz
eae8e5314f Replaced spaces for tabs, included the option to do not stop the test in case one fails, and also included the do_Login test 2008-07-30 18:34:19 +00:00
phreakz
4a21cb2c11 Replaced spaces for tabs, and included the option to do not stop the test in case one fails 2008-07-30 18:26:29 +00:00
phreakz
b52a28e021 Replaced spaces for tabs, and included the option to do not stop the test in case one fails 2008-07-30 18:04:25 +00:00
phreakz
578f78ab80 rijndael tests 2008-07-30 17:59:26 +00:00
phreakz
ff2d108c54 Now includes rijndael_func call 2008-07-30 17:58:01 +00:00
phreakz
01b5e5d750 Now includes rijndael_func call 2008-07-30 17:47:40 +00:00
phreakz
1626450f18 Now includes rijndael tests 2008-07-30 17:45:13 +00:00
phreakz
038bd15e42 Script responsible for testcases automation, checking the environment in which they will be run 2008-07-30 17:43:42 +00:00
mhalcrow
e2dd1ba7ad Add support for SHA-384 and SHA-512 in the S390 ICA token. 2007-12-05 22:52:00 +00:00
tlendacky
854686641b fix some compiler warnings 2007-08-30 16:16:43 +00:00
kyoder
ab2e1b3ae2 fix pub exponent in test_rsa_encryption 2007-04-23 15:48:11 +00:00
kyoder
c04cd425f6 Fixes for 4 problems throughout this file: Invalid AES key creation templates, invalid IV sizes, invalid key unwrapping templates and invalid buffer sizes for decrypt operations 2007-01-23 17:40:44 +00:00
kyoder
5fc6af64dc return error when AES tests fail 2007-01-23 17:38:51 +00:00
danielhjones
10fab56f12 Fixed calls to do_GetFunctionList. 2006-08-24 22:58:19 +00:00
danielhjones
02ee059e58 Cleanup compiler warnings. 2006-06-15 21:23:18 +00:00
kyoder
9bd2cb1694 initial add -- verifies RSA signatures against openssl 2006-04-21 15:33:39 +00:00
kyoder
62d5a3c174 include rsa_sign_test 2006-04-21 15:32:52 +00:00
kyoder
f8349e696e use the common code library 2006-04-21 15:32:35 +00:00
kyoder
e5c16edfe6 testcase complete rework 2006-04-21 15:14:30 +00:00
kyoder
ac3dfc6ff0 initial add -- common routines that all testcases use 2006-04-21 15:13:54 +00:00
kyoder
cc2cebbd33 initial add - saves objects to the store, closes the ctx and reads them back out 2006-04-21 15:10:47 +00:00
kyoder
f789042d44 merge with cleanup branch 2006-04-05 20:07:40 +00:00
mhalcrow
a5f3f20084 Set the PIN numbers to be right for the speed test 2006-03-29 20:26:54 +00:00
mhalcrow
56ea6cff90 Fix the testcase PIN number (TODO: make this the same #define as all the other tests) 2006-03-29 20:25:20 +00:00
mhalcrow
9d961a3f2b Migrate to libopencryptoki.so. The linker should resolve the library location. 2006-03-10 16:35:38 +00:00
mhalcrow
7b73fe45aa Remove reference to out label (defined in prior version of OCK) 2006-01-11 19:36:15 +00:00
mhalcrow
7ae3939a5f AES tests 2006-01-11 17:30:02 +00:00
mhalcrow
8bba4e17a4 Add AES test to driver testcase set 2006-01-11 17:29:24 +00:00
mhalcrow
cfe1fcf331 Support for testing SHA256 (from 2.1.6 branch) 2005-12-16 20:13:47 +00:00
kyoder
65652bf416 allow passwords to be overridden by env vars;print out the SO/USER pins that the testcase leaves set 2005-11-29 22:27:32 +00:00
mhalcrow
e168a9fce9 Set the testcase pins correctly 2005-11-03 20:02:13 +00:00
mhalcrow
c2608df0da Update PIN settings for new values in 2.2.x 2005-09-13 18:43:13 +00:00
mhalcrow
e05964d30a Script to automate test setup 2005-09-02 15:10:46 +00:00
kyoder
4f91307904 fixed help message 2005-08-19 16:39:00 +00:00
tlendacky
70953f6813 Fix testcases build errors when openCryptoki isn't installed 2005-08-18 19:44:49 +00:00