Common Data Security Architecture (CDSA) White Paper
Chapter 1 53
Common Data Security Architecture (CDSA) White Paper
How to Create a CDSA Add-In Module for HP-UX
How to Create a CDSA Add-In Module for
HP-UX
This section summarizes the steps involved in creating a CDSA add-in module.
By convention, the CDSA add-in module is named libxxx.1 for the first version of the library,
where xxx is the library’s chosen name. If /usr/lib file system supports only short file names,
limit the library name to 14 characters. The add-in libraries must reside in /usr/lib/cdsa.
1. Create a global unique identifier (GUID) for the add-in module on the system.
On HP-UX, you can use /usr/bin/uuidgen to generate a GUID.
Example:
Issue the following from the command line:
#/usr/bin/uuidgen -s
Output will resemble the following:
= { /* 714ed4ea-15d8-11d2-9be7-0060b0b6e655 */
0x714ed4ea, 0x15d8, 0x11d2, 0x9b, 0xe7,
{ 0x00, 0x60, 0xb0, 0xb6, 0xe6, 0x55 }
}
The “714ed4ea-15d8-11d2-9be7-0060b0b6e655” might be the literal name of the GUID, but
in your source file, you can define it as follows:
CSSM_GUID my_addin_guid =
{ /* 714ed4ea-15d8-11d2-9be7-0060b0b6e655 */
0x714ed4ea, 0x15d8, 0x11d2, {0x9b, 0xe7, 0x00, 0x60, 0xb0, 0xb6, 0xe6,
0x55}
};
Then my_addin_guid can be used whenever a GUID is needed; for example:
• when you register the module to CSSM, pass &my_addin_guid to
CSSM_RegisterServices().
• when you install the module, pass &my_addin_guid to CSSM_ModuleInstall().
• when you attach the module, pass &my_addin_guid to CSSM_ModuleAttach().