Chapter 4 Details of Crypto-C Functions 295
B_CreateSessionChooser
B_CreateSessionChooser
Description
B_CreateSessionChooser replicates the fixed chooser inclusive of making private
copies of the AM structures. Whenever possible the software-based methods are
replaced with the hardware-based methods defined either statically by
staticHardwareList
or dynamically determined by platform specific routines. All
methods in the
fixedChooser
will be represented in the
sessionChooser
and will appear
multiple times if there are multiple hardware substitutes available.
Notes:
It is simple to limit the binding of hardware methods to exclusively static or
dynamically defined entries. The algorithm method structures that constitute
sessionChooser
are B_METHOD structures extended to include an information pointer
and a finalization function to destroy it.
Return value
int B_CreateSessionChooser (
B_ALGORITHM_CHOOSER fixedChooser, /* Chooser consisting of */
software-based algorithm methods. */
B_ALGORITHM_CHOOSER *sessionChooser, /* Runtime chooser */
/* dynamically bound to available hardware based methods. */
HW_TABLE_ENTRY *staticHardwareList[ ], /* List of statically defined */
/* hardware methods terminated by a */
/* properly cast NULL_PTR. */
ITEM *passPhrase, /* hardware passphrase */
POINTER *amTagList, /* For now pass (*)NULL_PTR */
unsigned char ***listOfOEMTags /* Returns list of OEM tags */
/* for methods in sessionChooser */
);
Value Description
0 Operation was successful.
nonzero unsuccessful, allocation error