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

31 Commits

Author SHA1 Message Date
Ingo Franzki
25455537fa Add SHA512_224/256 mechanisms to common code and EP11 token
Add mechanisms CKM_SHA512_224, CKM_SHA512_224_HMAC, CKM_SHA512_224_HMAC_GENERAL
CKM_SHA512_256, CKM_SHA512_256_HMAC, and CKM_SHA512_256_HMAC_GENERAL
to common code and the EP11 token.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
2018-01-31 10:20:07 -02:00
Ingo Franzki
e4e77e5eff Add SHA-2 based key derivation mechanisms to common code and EP11
Add mechanisms CKM_SHA224_KEY_DERIVATION, CKM_SHA384_KEY_DERIVATION,
and CKM_SHA512_KEY_DERIVATION to common code and EP11.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
2018-01-31 10:20:07 -02:00
Ingo Franzki
b8db846b96 Update rsa testcase to test SHA224_RSA_PKCS mechanism
The rsa testcase (rsa_func.c) will now also test
mechanism CKM_SHA224_RSA_PKCS.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
2018-01-31 10:20:07 -02:00
Ingo Franzki
ad3c195ccd Update ec testcase to test ECDSA_SHA224 mechanism
The ec testcase (ec_func.c) will now also test
mechanism CKM_ECDSA_SHA224.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
2018-01-31 10:20:07 -02:00
Ingo Franzki
a2efbdc80f Update digest testcase to test SHA224 mechanisms
The digest testcase (digest_func.c) will now also test
mechanisms CKM_SHA224, CKM_SHA224_HMAC, and
CKM_SHA224_HMAC_GENERAL.

Signed-off-by: Ingo Franzki <ifranzki@linux.vnet.ibm.com>
2018-01-31 10:20:07 -02:00
Eduardo Barretto
90b2b52915 Remove unnecessary executable permission
Some files had a legacy executable permission that in not necessary. So, removed
it.

Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
2017-10-31 15:57:12 -02:00
Ingo Franzki
d509a33528 ep11 token, cca token: Add ECDSA SHA2 support
Slightly adapted version of Ingo's patch:
Patch hunks needed relocation because of previous commits
in some files. Removed some trailing whitespaces.
Tested, works.

Signed-off-by: Ingo Franzki <ifranzki@de.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
2017-04-05 13:33:48 -03:00
Paulo Vital
54eb5f946a Add CPL-1.0 license header to source code files.
Add the license header in those source code files are missing it.

Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com>
2017-03-15 16:37:46 -03:00
Harald Freudenberger
90129185f8 Fixed sess_mgnt testcase failure on CCA and EP11 tokens
Signed-off-by:Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Vineetha Pai <vpishar@us.ibm.com>
2016-01-11 15:06:52 -05:00
Harald Freudenberger
cf264e2e40 Some small fixes and improvements on the digest testcase:
- multipart digest update now really breaks down the data
  into chunks.
- fix in regress.h: macro testcase_pass prints out timev differences
  but start time was nowhere set (causing to print just some kind of
  random time). Now the testcase_begin* macros set start time and thus
  the time values printed out make sense.

Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2014-08-21 16:39:23 -05:00
Joy Latten
34ddc70f6f Changed symmetric testcases to accept "-securekey" if using securekey token.
This ensures only published test vectors are not run on secure key tokens.
Before we were checking for securekey based on mode name, but this won't
work for ICSF whose model name is not hardcoded or set by OCK.

Signed-off-by: Joy Latten <latten@linux.vnet.ibm.com>
Reviewed-by: Debora Babb
Reviewed-by: Marcelo Cerri
2013-05-21 00:10:51 +02:00
Marcelo Cerri
609bf299c7 Fix: remove warnings
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Reviewed-by: Debora Babb <dvelarde@us.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2013-05-20 21:12:32 +02:00
Marcelo Cerri
24a96a91a7 Fix: infinite loop when a test case fails to login
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2013-05-20 20:31:46 +02:00
Joy Latten
9f2b30fc1f Removed old testcases and restructured testcase subdirectories.
Signed-off-by: Joy Latten <jmlatten@users.sourceforge.net>
2012-01-25 11:52:55 -06:00
Fionnuala Gunter
79d74b43d2 Fixes looping through all the testcases when user pin is not set.
Now we exit first time it occurs.

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
2011-08-18 11:31:42 -05:00
Fionnuala Gunter
e696654f01 Added t_error to count number of errors encountered.
Errors are tallied, and included in summary results.
Total number of tests don't need to be hardcoded;
instead total = run + skipped.

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
2011-07-08 16:08:54 -05:00
Ashley Lai
ef0ec85a58 Added Elliptic Curve support
Signed-off-by: Ashley Lai <adlai@us.ibm.com>
2011-05-11 15:17:08 -05:00
Klaus Heinrich Kiwi
0f2514cd23 testsuite: Proper session handling in regress.h macros
If we fail to create a session, invalidade the session
  handler and check that when closing sessions.

  Trying to C_CloseSession() on an invalid handle may
  segfault the caller.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-12-18 17:32:50 -02:00
Klaus Heinrich Kiwi
8a05dedc86 testsuite: add a bunch of new macros to regress.h
Add many new macros with the aim of simplifying
    testcases.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-12-08 17:56:39 -02:00
Klaus Heinrich Kiwi
7c632b898c testsuite: Introduce standard pass/fail/skip/error macros
Introduce testcase_[pass|fail|skip|error] macros to be used
  across the testsuite and thus standardize testcases format and
  output.

  The macros will also try to time the operation execution, now
  with microsecond resolution.

  I've also provided testcase_*_f alternatives for cases where
  we need to manually identify the test (instead of just using
  __func__).

  This patch also "converts" obj_mgmt.c tests to use the new
  macros.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-08-30 12:38:19 -03:00
Klaus Heinrich Kiwi
47571bbeab Start consolidating pkcs#11 utility functions
Opencryptoki has a number of places which use misc pkcs#11 utility
  functions.

  This patch creates p11util.c which to start consolidating those
  functions in one place.

Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
2010-08-17 12:31:47 -03:00
Kent Yoder
2ea423f04e driver testcase updates: regress.h
- remove incorrect/unused prototypes

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>

 testcases/include/regress.h |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
2010-08-13 16:50:01 -03:00
Kent Yoder
02d045d533 update show_error to print file and line numbers for any test errors
This patch makes the show_error() function used by the testcases a macro, then adds printing of a file and line number wherever its called.  This patch also changes the file descriptor these strings print to from stdout to stderr.  This will make finding errors in automated test runs easier.

Thanks,
Kent

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
2010-07-31 01:26:20 -03: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
danielhjones
02ee059e58 Cleanup compiler warnings. 2006-06-15 21:23:18 +00:00
kyoder
e5c16edfe6 testcase complete rework 2006-04-21 15:14:30 +00:00
kyoder
f789042d44 merge with cleanup branch 2006-04-05 20:07:40 +00:00
mhalcrow
e168a9fce9 Set the testcase pins correctly 2005-11-03 20:02:13 +00:00
kyoder
1fe8ca54f5 tie all passwords into on #define in include/regress.h 2005-06-17 15:35:16 +00:00
mhalcrow
8ae034954c Set of patches from Kent Yoder:
- libtoolize
 - configurable paths
 - lib/*.so64 -> lib64/*.so
 - nix AIX #ifdef's
 - nix LINUX #ifdef's
 - Genral cleanup
2005-02-22 20:45:39 +00:00
kyoder
9961353e5b Initial revision 2005-01-18 16:08:12 +00:00