Hi,

  This patch leverages the session handling update patch to store
PKCS#11 objects in a binary tree.  This will keep applications from
crashing when passing in an invalid CK_OBJECT_HANDLE.  There is no
performance regression versus the memory handle approach. I'm attaching
a link to the patch since it pretty large.

  Additional changes in this patch:
- Uncommented the relevant testcases in testcases/driver/obj_mgmt.c
- In object_mgr_del_from_shm(), use memmove instead of memcpy, since the
copy can apply to overlapping memory regions
- Removed some already commented out code

Thanks,
Kent

 testcases/driver/obj_mgmt.c          |   16 +-
 usr/lib/pkcs11/cca_stdll/globals.c   |    8 +-
 usr/lib/pkcs11/cca_stdll/h_extern.h  |   52 ++-
 usr/lib/pkcs11/cca_stdll/host_defs.h |    4 +-
 usr/lib/pkcs11/cca_stdll/new_host.c  |   20 +-
 usr/lib/pkcs11/common/btree.c        |    2 +-
 usr/lib/pkcs11/common/globals.c      |    8 +-
 usr/lib/pkcs11/common/h_extern.h     |   53 ++-
 usr/lib/pkcs11/common/host_defs.h    |    4 +-
 usr/lib/pkcs11/common/new_host.c     |   20 +-
 usr/lib/pkcs11/common/obj_mgr.c      | 1452
+++++++++++++---------------------
 usr/lib/pkcs11/tpm_stdll/globals.c   |    8 +-
 usr/lib/pkcs11/tpm_stdll/h_extern.h  |   53 ++-
 usr/lib/pkcs11/tpm_stdll/host_defs.h |    4 +-
 usr/lib/pkcs11/tpm_stdll/new_host.c  |   23 +-
 15 files changed, 728 insertions(+), 999 deletions(-)


Signed-off-by: Kent Yoder <[email protected]>

[1]
https://sourceforge.net/tracker/download.php?group_id=128009&atid=710344&file_id=409195&aid=3196229


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to