Common Data Security Architecture (CDSA) White Paper

108 AppendixE
Trouble Shooting HP CDSA
CDSA API Errors
CDSA API Errors
When CDSA functions do not complete their designated operations successfully, typically, 0,
NULL, CSSM_FAIL, or CSSM_FALSE values may be returned to calling programs. In order
to gain more information regarding the failure, the CDSA function CSSM_GetError() may be
called to retrieve the error code of the last CDSA error detected by the system. The error
codes are defined in the CDSA include file cssmerr.h (located in /usr/include/cdsa). A brief
error description and corresponding error code are reproduced below for convenience.
CSP Error Description CSP Error Code
CSSM_CSP_UNKNOWN_ERROR 1001
CSSM_CSP_REGISTER_ERROR 1002
CSSM_CSP_VERSION_ERROR 1003
CSSM_CSP_CONVERSION_ERROR 1004
CSSM_CSP_NO_TOKENINFO 1005
CSSM_CSP_INTERNAL_ERROR 1006
CSSM_CSP_SERIAL_REQUIRED 1007
CSSM_CSP_NOT_IMPLEMENTED 1008
CSSM_CSP_GET_APIMEMFUNC_ERROR 1009
CSSM_CSP_MEMORY_ERROR 1020
CSSM_CSP_NOT_ENOUGH_BUFFER 1021
CSSM_CSP_ERR_OUTBUF_LENGTH 1022
CSSM_CSP_NO_OUTBUF 1023
CSSM_CSP_ERR_INBUF_LENGTH 1024
CSSM_CSP_ERR_KEYBUF_LENGTH 1025
CSSM_CSP_NO_SLOT 1026
CSSM_CSP_INVALID_CSP_HANDLE 1030
CSSM_CSP_INVALID_POINTER 1031
CSSM_CSP_INVALID_CONTEXT 1032
CSSM_CSP_INVALID_CONTEXT_HANDLE 1033
CSSM_CSP_INVALID_CONTEXT_POINTER 1034