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>
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>
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>
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>
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>
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>
- 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