z/OS Open Cryptographic Services Facility Service Provider Module Developer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Data storage library OCSF errors

z/OS Open Cryptographic Services Facility Service Provider Module Developer's Guide and Reference
SC14-7514-00

This section defines the error code range in OCSF that provides a consistent mechanism across all layers of OCSF for returning errors to the caller. All Data Storage Library (DL) service provider interface (SPI) functions return one of the following:

  • CSSM_RETURN - An enumerated type consisting of CSSM_OK and CSSM_FAIL. If it is CSSM_FAIL, an error code indicating the reason for failure can be obtained by calling CSSM_GetError.
  • CSSM_BOOL - OCSF functions returning this data type return either CSSM_TRUE or CSSM_FALSE. If the function returns CSSM_FALSE, an error code may be available (but not always) by calling CSSM_GetError.
  • A pointer to a data structure, a handle, a file size, or whatever is logical for the function to return. An error code may be available (but not always) by calling CSSM_GetError.

The information returned from CSSM_GetError includes both the error number and a Globally Unique ID (GUID) that associates the error with the module that set it. Each module must have a mechanism for reporting their errors to the calling application. In general, there are two types of errors a module can return:

  • Errors defined by OCSF that are common to a particular type of service provider module.
  • Errors reserved for use by individual service provider modules.

Since some errors are predefined by OCSF, those errors have a set of predefined numeric values that are reserved by OCSF, and cannot be redefined by modules. For errors that are particular to a module, a different set of predefined values has been reserved for their use. Table 13 lists the range of error numbers defined by OCSF for DL modules and those available for use individual DL modules. See the z/OS Open Cryptographic Services Facility Application Programming book for a list of error codes and their descriptions for DL.

Table 1. Data Storage Library Module Error Numbers
Error Number Range Description
5000 – 5999 DL errors defined by OCSF
6000 – 6999 DL errors reserved for individual DL modules

The calling application must determine how to handle the error returned by CSSM_GetError. Detailed descriptions of the error values will be available in the corresponding specification, the cssmerr.h header file, and the documentation for specific modules. If a routine does not know how to handle the error, it may choose to pass the error to its caller.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014