Three structures
are used to contain all of the static information that describes a CSP module:
cssm_moduleinfo, cssm_serviceinfo, and cssm_cspsubservice. This descriptive
information is securely stored in the OCSF registry when the CSP module is
installed with CSSM. A CSP module may implement multiple types of services
and organize them as subservices.
The descriptive information stored in these structures can be queried using
the function CSSM_GetModuleInfo and specifying the CSP module Globally Unique
ID (GUID).
typedef struct cssm_cspsubservice {
uint32 SubServiceId;
CSSM_STRING Description;
CSSM_CSP_FLAGS CspFlags; /* General flags defined by CSSM for CSPs */
uint32 CspCustomFlags; /* Flags defined by individual CSP */
uint32 AccessFlags; /* Access Flags used by CSP */
CSSM_CSPTYPE CspType; /* CSP type number for dereferencing CspInfo */
union { /* info struct of type defined by CspType */
CSSM_SOFTWARE_CSPSUBSERVICE_INFO SoftwareCspSubService;
CSSM_HARDWARE_CSPSUBSERVICE_INFO HardwareCspSubService;
#ifndef _MVS_
};
#else
/* Use the CDSA Version 2.0 definition instead of the anonymous union of
the Version 1.x spec which unfortunately is not ANSI-C compatible. */
}SubServiceInfo;
#endif
CSSM_CSP_WRAPPEDPRODUCT_INFO WrappedProduct;
}CSSM_CSPSUBSERVICE, *CSSM_CSPSUBSERVICE_PTR;
Definitions:
- SubServiceId
- The subservice ID required for an attach call to connect a CSP to an
individual subservice within a CSP.
- Description
- A NULL-terminated character string containing a text description of
the subservice.
- CspFlags
- A bit-mask containing general flags defined by OCSF for CSPs. The mask
may contain one or a combination of these in Table 28.
Table 28. CSP FlagsCSSM_CSP_FLAGS Values | Description |
---|
CSSM_CSP_STORES_PRIVATE_KEYS | CSP can store private keys. | CSSM_CSP_STORES_PUBLIC_KEYS | CSP can store public keys. | CSSM_CSP_STORES_SESSION_KEYS | CSP can store session/secret keys. |
- CspCustomFlags
- Flags defined by the vendor. Consult the individual CSP User's Guide
for the list of valid flags.
- AccessFlags
- Flags that are required to be provided by the application during an
attach call when specifying the subservice ID given in SubServiceId.
- CspType
- Identifier that determines the type of CSP information structure referenced
by CspInfo. The values and their corresponding CSP
information structures are currently defined in Table 29.
Table 29. CSP Informtation Type Identifiers and Associated Structure TypesCSP Information Structure Identifier | Structure Type |
---|
CSSM_CSP_TYPE_SOFTWARE | CSSM_CSP_TYPE_SOFTWARE_INFO | CSSM_CSP_TYPE_PKCS11 | CSSM_CSP_TYPE_PKCS11_INFO |
- SoftwareCspSubService/HardwareCspSubService
- A CSP information structure of the type specified by CspType.
- WrappedProduct
- Pointer to a CSSM_CSP_WRAPPEDPRODUCTINFO structure describing a product
that is wrapped by the CSP.
|