KM_ExportToSCwMethod

Export one or more objects to one or more smart cards. It allows users to select the method used to generate component keys.

NOTE   This function is deprecated. Thales recommends using KM_ExportToSCwMethodAlg instead.

Synopsis

#include <kmlib.h>

CK_RV KM_ExportToSCwMethod ( 
   CK_SESSION_HANDLE   hSession,
   CK_CHAR *           pUserPIN,
   CK_SIZE             userPinLen, 
   CK_OBJECT_HANDLE *  phWrapeeObjs, 
   CK_COUNT            numWrapeeObjs, 
   CK_OBJECT_HANDLE    hWrapKey, 
   CK_SLOT_ID          cardSlotId,
   uint32              deriveMech
);
Parameter Description
hSession Handle to an open session.
pUserPIN The Token's User PIN.
userPinLen Length of user PIN number
phWrapeeObjs Array of handles to objects that are to be exported.
numWrapeeObjs Number of objects in phWrapeeObjs.
hWrapKey Label of the wrapping key. For multiple custodian export, this parameter is set to CK_INVALID_HANDLE.
cardSlotId ID of the smart card slot to write to.
deriveMech

Mechanism used to derive component keys:

>KM_XOR_MECHANISM

>KM_NOFM_MECHANISM

Returns

CKR_ARGUMENTS_BAD
CKR_ATTRIBUTE_READ_ONLY
CKR_ATTRIBUTE_SENSITIVE
CKR_ATTRIBUTE_TYPE_INVALID
CKR_ATTRIBUTE_VALUE_INVALID
CKR_BUFFER_TOO_SMALL
CKR_CRYPTOKI_NOT_INITIALIZED
CKR_DATA_INVALID
CKR_DATA_LEN_RANGE
CKR_DEVICE_ERROR
CKR_DEVICE_MEMORY
CKR_DEVICE_REMOVED
CKR_FUNCTION_CANCELED
CKR_FUNCTION_FAILED
CKR_GENERAL_ERROR
CKR_HOST_MEMORY
CKR_INFORMATION_SENSITIVE
CKR_KEY_FUNCTION_NOT_PERMITTED 
CKR_KEY_HANDLE_INVALID
CKR_KEY_NOT_WRAPPABLE
CKR_KEY_SIZE_RANGE
CKR_KEY_TYPE_INCONSISTENT
CKR_KEY_UNEXTRACTABLE
CKR_MECHANISM_INVALID
CKR_MECHANISM_PARAM_INVALID
CKR_OBJECT_HANDLE_INVALID
CKR_OK
CKR_OPERATION_ACTIVE
CKR_OPERATION_NOT_INITIALIZED
CKR_PIN_EXPIRED
CKR_PIN_INCORRECT
CKR_PIN_INVALID
CKR_PIN_LEN_RANGE
CKR_PIN_LOCKED
CKR_SESSION_CLOSED
CKR_SESSION_COUNT
CKR_SESSION_HANDLE_INVALID
CKR_SESSION_PARALLEL_NOT_SUPPORTED
CKR_SESSION_READ_ONLY
CKR_SESSION_READ_ONLY_EXISTS
CKR_SESSION_READ_WRITE_SO_EXISTS
CKR_SLOT_ID_INVALID
CKR_TEMPLATE_INCOMPLETE
CKR_TEMPLATE_INCONSISTENT
CKR_TOKEN_NOT_PRESENT
CKR_TOKEN_NOT_RECOGNIZED
CKR_TOKEN_WRITE_PROTECTED
CKR_USER_ALREADY_LOGGED_IN
CKR_USER_ANOTHER_ALREADY_LOGGED_IN
CKR_USER_NOT_LOGGED_IN
CKR_USER_PIN_NOT_INITIALIZED
CKR_USER_TOO_MANY_TYPES
CKR_USER_TYPE_INVALID
CKR_WRAPPING_KEY_HANDLE_INVALID
CKR_WRAPPING_KEY_SIZE_RANGE
CKR_WRAPPING_KEY_TYPE_INCONSISTENT